diff options
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r-- | src/SMAPI.Web/Controllers/JsonValidatorController.cs | 6 | ||||
-rw-r--r-- | src/SMAPI.Web/Controllers/ModsApiController.cs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/SMAPI.Web/Controllers/JsonValidatorController.cs b/src/SMAPI.Web/Controllers/JsonValidatorController.cs index 5f83eafd..6ba97749 100644 --- a/src/SMAPI.Web/Controllers/JsonValidatorController.cs +++ b/src/SMAPI.Web/Controllers/JsonValidatorController.cs @@ -280,7 +280,7 @@ namespace StardewModdingAPI.Web.Controllers IDictionary<string, string> errors = this.GetExtensionField<Dictionary<string, string>>(error.Schema, "@errorMessages"); if (errors == null) return null; - errors = new Dictionary<string, string>(errors, StringComparer.InvariantCultureIgnoreCase); + errors = new Dictionary<string, string>(errors, StringComparer.OrdinalIgnoreCase); // match error by type and message foreach ((string target, string errorMessage) in errors) @@ -289,7 +289,7 @@ namespace StardewModdingAPI.Web.Controllers continue; string[] parts = target.Split(':', 2); - if (parts[0].Equals(error.ErrorType.ToString(), StringComparison.InvariantCultureIgnoreCase) && Regex.IsMatch(error.Message, parts[1])) + if (parts[0].Equals(error.ErrorType.ToString(), StringComparison.OrdinalIgnoreCase) && Regex.IsMatch(error.Message, parts[1])) return errorMessage?.Trim(); } @@ -313,7 +313,7 @@ namespace StardewModdingAPI.Web.Controllers { foreach ((string curKey, JToken value) in schema.ExtensionData) { - if (curKey.Equals(key, StringComparison.InvariantCultureIgnoreCase)) + if (curKey.Equals(key, StringComparison.OrdinalIgnoreCase)) return value.ToObject<T>(); } } diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs index db669bf9..cd5b6779 100644 --- a/src/SMAPI.Web/Controllers/ModsApiController.cs +++ b/src/SMAPI.Web/Controllers/ModsApiController.cs @@ -118,9 +118,9 @@ namespace StardewModdingAPI.Web.Controllers { // cross-reference data ModDataRecord record = this.ModDatabase.Get(search.ID); - WikiModEntry wikiEntry = wikiData.FirstOrDefault(entry => entry.ID.Contains(search.ID.Trim(), StringComparer.InvariantCultureIgnoreCase)); + WikiModEntry wikiEntry = wikiData.FirstOrDefault(entry => entry.ID.Contains(search.ID.Trim(), StringComparer.OrdinalIgnoreCase)); UpdateKey[] updateKeys = this.GetUpdateKeys(search.UpdateKeys, record, wikiEntry).ToArray(); - ModOverrideConfig overrides = this.Config.Value.ModOverrides.FirstOrDefault(p => p.ID.Equals(search.ID?.Trim(), StringComparison.InvariantCultureIgnoreCase)); + ModOverrideConfig overrides = this.Config.Value.ModOverrides.FirstOrDefault(p => p.ID.Equals(search.ID?.Trim(), StringComparison.OrdinalIgnoreCase)); bool allowNonStandardVersions = overrides?.AllowNonStandardVersions ?? false; // get latest versions |