From e4637ad295f7e40ecac6db1119bc8c85e1161699 Mon Sep 17 00:00:00 2001 From: Jkorf <jankorf91@gmail.com> Date: Tue, 13 May 2025 15:53:13 +0200 Subject: [PATCH] Disable warning for AOT in testing helpers --- CryptoExchange.Net/Testing/Comparers/SystemTextJsonComparer.cs | 3 +++ CryptoExchange.Net/Testing/Implementations/TestSocket.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CryptoExchange.Net/Testing/Comparers/SystemTextJsonComparer.cs b/CryptoExchange.Net/Testing/Comparers/SystemTextJsonComparer.cs index b11fb01..47f3239 100644 --- a/CryptoExchange.Net/Testing/Comparers/SystemTextJsonComparer.cs +++ b/CryptoExchange.Net/Testing/Comparers/SystemTextJsonComparer.cs @@ -10,6 +10,9 @@ using System.Text.Json.Serialization; using CryptoExchange.Net.Converters; using CryptoExchange.Net.Converters.SystemTextJson; +#pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code +#pragma warning disable IL3050 // Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling. + namespace CryptoExchange.Net.Testing.Comparers { internal class SystemTextJsonComparer diff --git a/CryptoExchange.Net/Testing/Implementations/TestSocket.cs b/CryptoExchange.Net/Testing/Implementations/TestSocket.cs index dde591d..b746ac7 100644 --- a/CryptoExchange.Net/Testing/Implementations/TestSocket.cs +++ b/CryptoExchange.Net/Testing/Implementations/TestSocket.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; using CryptoExchange.Net.Interfaces; using CryptoExchange.Net.Objects; +#pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code +#pragma warning disable IL3050 // Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling. + namespace CryptoExchange.Net.Testing.Implementations { internal class TestSocket : IWebsocket