From 7b0075d19ecc1ce6c1bcf8a8171601f18b2e1117 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 2 Apr 2021 09:23:28 -0700 Subject: [PATCH] Moving Suppress message to assembly level and adding Scope in order to get right suppressing behavior (#50626) * Moving Suppress message to assembly level and adding Scope in order to get right suppressing behavior * Fixing indentation --- .../src/System/Security/Cryptography/CryptoConfigForwarder.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoConfigForwarder.cs b/src/libraries/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoConfigForwarder.cs index e5d86ac..bd82112 100644 --- a/src/libraries/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoConfigForwarder.cs +++ b/src/libraries/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoConfigForwarder.cs @@ -4,11 +4,13 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; +[assembly: UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", + Target = "M:System.Security.Cryptography.CryptoConfigForwarder.#cctor", + Scope = "member", + Justification = "The cctor caches the RequiresUnreferencedCode call in a delegate, and usage of that delegate is marked with RequiresUnreferencedCode.")] + namespace System.Security.Cryptography { - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", - Target = "M:System.Security.Cryptography.CryptoConfigForwarder.#cctor", - Justification = "The cctor caches the RequiresUnreferencedCode call in a delegate, and usage of that delegate is marked with RequiresUnreferencedCode.")] internal static class CryptoConfigForwarder { internal const string CreateFromNameUnreferencedCodeMessage = "The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead."; -- 2.7.4