Skip to content

Commit

Permalink
Moving Suppress message to assembly level and adding Scope in order t…
Browse files Browse the repository at this point in the history
…o get right suppressing behavior (dotnet#50626)

* Moving Suppress message to assembly level and adding Scope in order to get right suppressing behavior

* Fixing indentation
  • Loading branch information
joperezr authored Apr 2, 2021
1 parent 272f1cd commit 7b0075d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down

0 comments on commit 7b0075d

Please sign in to comment.