From a59087b57434855a5f35ec05af8b9961a5d95cb0 Mon Sep 17 00:00:00 2001 From: Archi Date: Mon, 27 Nov 2023 13:01:52 +0100 Subject: [PATCH] Resolve some warnings --- .editorconfig | 1 + ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs | 2 ++ Directory.Build.props | 5 +---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index e0abd4f07..50d8eec8d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -114,6 +114,7 @@ dotnet_code_quality_unused_parameters = all:warning dotnet_diagnostic.ca1028.severity = silent dotnet_diagnostic.ca1031.severity = silent +dotnet_diagnostic.ca1863.severity = silent # Rule - almost everything dotnet_naming_rule.almost_everything_must_be_pascal_case.severity = warning diff --git a/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs b/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs index 9b5059ab9..5bd32b01c 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Net; @@ -41,6 +42,7 @@ public sealed class TypeController : ArchiController { /// /// Type info is defined as a representation of given object with its fields and properties being assigned to a string value that defines their type. /// + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)] [HttpGet("{type:required}")] [ProducesResponseType>((int) HttpStatusCode.OK)] [ProducesResponseType((int) HttpStatusCode.BadRequest)] diff --git a/Directory.Build.props b/Directory.Build.props index b6226dc2f..7398ea075 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -50,10 +50,7 @@ none true - CS8002,IL2026,IL2057,IL2072,IL2075,IL2104,IL3000 - - - $(WarningsNotAsErrors),CA1863 + CA1863,CS8002,IL2026,IL2057,IL2072,IL2075,IL2104,IL3000