From 237f23e96567c96e30aa35929dcff5dbd7bea5a8 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 20 Jun 2022 21:37:03 +0200 Subject: [PATCH] Attempt to silence excessive IL warnings --- ArchiSteamFarm/Steam/Storage/BotConfig.cs | 3 +++ ArchiSteamFarm/Storage/GlobalConfig.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/ArchiSteamFarm/Steam/Storage/BotConfig.cs b/ArchiSteamFarm/Steam/Storage/BotConfig.cs index d3c19046d..5d8b6db01 100644 --- a/ArchiSteamFarm/Steam/Storage/BotConfig.cs +++ b/ArchiSteamFarm/Steam/Storage/BotConfig.cs @@ -177,6 +177,7 @@ public sealed class BotConfig { [JsonProperty(Required = Required.DisallowNull)] [MaxLength(ArchiHandler.MaxGamesPlayedConcurrently)] [SwaggerItemsMinMax(MinimumUint = 1, MaximumUint = uint.MaxValue)] + [UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This is optional, supportive attribute, we don't care if it gets trimmed or not")] public ImmutableList GamesPlayedWhileIdle { get; private set; } = DefaultGamesPlayedWhileIdle; [JsonProperty(Required = Required.DisallowNull)] @@ -239,6 +240,7 @@ public sealed class BotConfig { [MaxLength(SteamParentalCodeLength)] [MinLength(SteamParentalCodeLength)] [SwaggerValidValues(ValidStringValues = new[] { "0" })] + [UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This is optional, supportive attribute, we don't care if it gets trimmed or not")] public string? SteamParentalCode { get => BackingSteamParentalCode; @@ -261,6 +263,7 @@ public sealed class BotConfig { [JsonProperty] [MaxLength(SteamTradeTokenLength)] [MinLength(SteamTradeTokenLength)] + [UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This is optional, supportive attribute, we don't care if it gets trimmed or not")] public string? SteamTradeToken { get; private set; } = DefaultSteamTradeToken; [JsonProperty(Required = Required.DisallowNull)] diff --git a/ArchiSteamFarm/Storage/GlobalConfig.cs b/ArchiSteamFarm/Storage/GlobalConfig.cs index 79c09c04b..1124578e9 100644 --- a/ArchiSteamFarm/Storage/GlobalConfig.cs +++ b/ArchiSteamFarm/Storage/GlobalConfig.cs @@ -258,6 +258,7 @@ public sealed class GlobalConfig { [JsonProperty] [MaxLength(SteamChatMessage.MaxMessagePrefixBytes / SteamChatMessage.ReservedEscapeMessageBytes)] + [UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This is optional, supportive attribute, we don't care if it gets trimmed or not")] public string? SteamMessagePrefix { get; private set; } = DefaultSteamMessagePrefix; [JsonProperty(Required = Required.DisallowNull)]