Skip to content

Commit 1094681

Browse files
committed
Move suppression to delegate
1 parent 91b9ba5 commit 1094681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataProtection/DataProtection/src/XmlEncryption/XmlEncryptionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.AspNetCore.DataProtection.XmlEncryption;
1717
internal static unsafe class XmlEncryptionExtensions
1818
{
1919
// Used for testing edge case assembly loading errors
20+
[UnconditionalSuppressMessage("Trimmer", "IL2057", Justification = "Type.GetType result is only useful with types that are referenced by DataProtection assembly.")]
2021
internal static Func<string, Type?> _getType = name => Type.GetType(name, throwOnError: false);
2122

2223
public static XElement DecryptElement(this XElement element, IActivator activator)
@@ -70,7 +71,6 @@ public static XElement DecryptElement(this XElement element, IActivator activato
7071
return doc.Root!;
7172
}
7273

73-
[UnconditionalSuppressMessage("Trimmer", "IL2057", Justification = "Type.GetType result is only useful with types that are referenced by DataProtection assembly.")]
7474
private static IXmlDecryptor CreateDecryptor(IActivator activator, string decryptorTypeName)
7575
{
7676
if (!TryGetDecryptorType(decryptorTypeName, out var type))

0 commit comments

Comments
 (0)