From da5afebe03b76b298586f5b4c8f3d7cbb2128f8f Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Thu, 13 Apr 2023 12:02:10 -0700 Subject: [PATCH] Not verified --- Adaptation/.editorconfig | 5 ++++- Adaptation/EC.Tests.csproj | 6 +++--- Adaptation/Shared/Metrology/WS.cs | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Adaptation/.editorconfig b/Adaptation/.editorconfig index b84fca4..b45701e 100644 --- a/Adaptation/.editorconfig +++ b/Adaptation/.editorconfig @@ -76,12 +76,15 @@ csharp_using_directive_placement = outside_namespace dotnet_code_quality_unused_parameters = all dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter dotnet_code_quality.CAXXXX.api_surface = private, internal +dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable +dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring +dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name -dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); +dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049) diff --git a/Adaptation/EC.Tests.csproj b/Adaptation/EC.Tests.csproj index 62fa65a..a7ab829 100644 --- a/Adaptation/EC.Tests.csproj +++ b/Adaptation/EC.Tests.csproj @@ -11,7 +11,7 @@ 10.0 disable win-x64 - net6.0 + net7.0 trx @@ -34,7 +34,7 @@ - + NU1701 NU1701 NU1701 @@ -43,7 +43,7 @@ NU1701 NU1701 - + diff --git a/Adaptation/Shared/Metrology/WS.cs b/Adaptation/Shared/Metrology/WS.cs index 12f261b..844efea 100644 --- a/Adaptation/Shared/Metrology/WS.cs +++ b/Adaptation/Shared/Metrology/WS.cs @@ -30,7 +30,7 @@ public partial class WS }; HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; - results = JsonSerializer.Deserialize(resultsJson); + results = JsonSerializer.Deserialize(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); } if (!results.Success) results.Errors.Add(results.ToString()); @@ -45,6 +45,7 @@ public partial class WS exception = exception.InnerException; } results.Errors ??= new List(); + results.Errors.Add(resultsJson); results.Errors.Add(stringBuilder.ToString()); } return new(resultsJson, results);