Skip to content

Commit

Permalink
(chocolateyGH-14) use case insensitive dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Jun 4, 2015
1 parent f489545 commit 4bb5d92
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/chocolatey/infrastructure.app/services/NugetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void list_noop(ChocolateyConfiguration config)

public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfiguration config, bool logResults = true)
{
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

var packages = NugetList.GetPackages(config, _nugetLogger).ToList();

Expand Down Expand Up @@ -239,7 +239,7 @@ public void install_noop(ChocolateyConfiguration config, Action<PackageResult> c
public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfiguration config, Action<PackageResult> continueAction)
{
_fileSystem.create_directory_if_not_exists(ApplicationParameters.PackagesLocation);
var packageInstalls = new ConcurrentDictionary<string, PackageResult>();
var packageInstalls = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

//todo: handle all

Expand Down Expand Up @@ -404,7 +404,7 @@ public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfigu
public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfiguration config, Action<PackageResult> continueAction, bool performAction)
{
_fileSystem.create_directory_if_not_exists(ApplicationParameters.PackagesLocation);
var packageInstalls = new ConcurrentDictionary<string, PackageResult>();
var packageInstalls = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

SemanticVersion version = config.Version != null ? new SemanticVersion(config.Version) : null;
var packageManager = NugetCommon.GetPackageManager(
Expand Down Expand Up @@ -754,7 +754,7 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi

public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfiguration config, Action<PackageResult> continueAction, bool performAction)
{
var packageUninstalls = new ConcurrentDictionary<string, PackageResult>();
var packageUninstalls = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

SemanticVersion version = config.Version != null ? new SemanticVersion(config.Version) : null;
var packageManager = NugetCommon.GetPackageManager(config, _nugetLogger,
Expand Down
6 changes: 3 additions & 3 deletions src/chocolatey/infrastructure.app/services/RubyGemsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void list_noop(ChocolateyConfiguration config)

public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfiguration config, bool logResults)
{
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
var args = ExternalCommandArgsBuilder.build_arguments(config, _listArguments);

Environment.ExitCode = _commandExecutor.execute(
Expand Down Expand Up @@ -172,7 +172,7 @@ public void install_noop(ChocolateyConfiguration config, Action<PackageResult> c

public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfiguration config, Action<PackageResult> continueAction)
{
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
var args = ExternalCommandArgsBuilder.build_arguments(config, _installArguments);

foreach (var packageToInstall in config.PackageNames.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries))
Expand Down Expand Up @@ -236,7 +236,7 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
public ConcurrentDictionary<string, PackageResult> upgrade_noop(ChocolateyConfiguration config, Action<PackageResult> continueAction)
{
this.Log().Warn(ChocolateyLoggers.Important, "{0} does not implement upgrade".format_with(APP_NAME));
return new ConcurrentDictionary<string, PackageResult>();
return new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
}

public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfiguration config, Action<PackageResult> continueAction)
Expand Down
6 changes: 3 additions & 3 deletions src/chocolatey/infrastructure.app/services/WebPiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void list_noop(ChocolateyConfiguration config)

public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfiguration config, bool logResults)
{
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
var args = ExternalCommandArgsBuilder.build_arguments(config, _listArguments);

//var whereToStartRecording = "---";
Expand Down Expand Up @@ -185,7 +185,7 @@ public void install_noop(ChocolateyConfiguration config, Action<PackageResult> c

public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfiguration config, Action<PackageResult> continueAction)
{
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
var args = ExternalCommandArgsBuilder.build_arguments(config, _installArguments);

foreach (var packageToInstall in config.PackageNames.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries))
Expand Down Expand Up @@ -242,7 +242,7 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
public ConcurrentDictionary<string, PackageResult> upgrade_noop(ChocolateyConfiguration config, Action<PackageResult> continueAction)
{
this.Log().Warn(ChocolateyLoggers.Important, "{0} does not implement upgrade".format_with(APP_NAME));
return new ConcurrentDictionary<string, PackageResult>();
return new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
}

public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfiguration config, Action<PackageResult> continueAction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public ConcurrentDictionary<string, PackageResult> list_run(ChocolateyConfigurat
{
set_executable_path_if_not_set();
var args = build_args(config, _listArguments);
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

Environment.ExitCode = _commandExecutor.execute(
_exePath,
Expand Down Expand Up @@ -249,7 +249,7 @@ public ConcurrentDictionary<string, PackageResult> install_run(ChocolateyConfigu
{
set_executable_path_if_not_set();
var args = build_args(config, _installArguments);
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

foreach (var packageToInstall in config.PackageNames.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries))
{
Expand Down Expand Up @@ -311,7 +311,7 @@ public ConcurrentDictionary<string, PackageResult> upgrade_noop(ChocolateyConfig
{
set_executable_path_if_not_set();
this.Log().Warn(ChocolateyLoggers.Important, "{0} does not implement upgrade".format_with(APP_NAME));
return new ConcurrentDictionary<string, PackageResult>();
return new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);
}

public ConcurrentDictionary<string, PackageResult> upgrade_run(ChocolateyConfiguration config, Action<PackageResult> continueAction)
Expand All @@ -331,7 +331,7 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi
{
set_executable_path_if_not_set();
var args = build_args(config, _uninstallArguments);
var packageResults = new ConcurrentDictionary<string, PackageResult>();
var packageResults = new ConcurrentDictionary<string, PackageResult>(StringComparer.InvariantCultureIgnoreCase);

foreach (var packageToInstall in config.PackageNames.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries))
{
Expand Down

0 comments on commit 4bb5d92

Please sign in to comment.