Skip to content

Commit

Permalink
Use StringComparer.OrdinalIgnoreCase for the dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Oct 21, 2022
1 parent 0c239ff commit 2e52c1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog][Keep a Changelog] and this project adh

## [Released]

## [2.2.1] - 2022-10-21

Small update that changes the equality comparer of the dictionary returned by `EGSHandler.FindAllGamesById` and `OriginHandler.FindAllGamesById` to `StringComparer.OrdinalIgnoreCase`.

## [2.2.0] - 2022-10-21

This update adds some utility functions you can use. I've also created a new package `GameFinder.Common` where all those new utility functions live:
Expand Down
2 changes: 1 addition & 1 deletion GameFinder.StoreHandlers.EGS/EGSHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public override Dictionary<string, EGSGame> FindAllGamesById(out string[] errors
var (games, allErrors) = FindAllGames().SplitResults();
errors = allErrors;

return games.ToDictionary(game => game.CatalogItemId, game => game);
return games.ToDictionary(game => game.CatalogItemId, game => game, StringComparer.OrdinalIgnoreCase);
}

private Result DeserializeGame(IFileInfo itemFile)
Expand Down
2 changes: 1 addition & 1 deletion GameFinder.StoreHandlers.Origin/OriginHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public override Dictionary<string, OriginGame> FindAllGamesById(out string[] err
var (games, allErrors) = FindAllGames().SplitResults();
errors = allErrors;

return games.ToDictionary(game => game.Id, game => game);
return games.ToDictionary(game => game.Id, game => game, StringComparer.OrdinalIgnoreCase);
}

private static Result ParseMfstFile(IFileInfo fileInfo)
Expand Down

0 comments on commit 2e52c1b

Please sign in to comment.