From: Jose Perez Rodriguez Date: Fri, 2 Apr 2021 16:23:28 +0000 (-0700) Subject: Moving Suppress message to assembly level and adding Scope in order to get right... X-Git-Tag: submit/tizen/20210909.063632~2249 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b0075d19ecc1ce6c1bcf8a8171601f18b2e1117;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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 --- 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.";