You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[UnconditionalSuppressMessage("Trimmer","IL2057",Justification="Type.GetType is only used to resolve statically known types that are referenced by DataProtection assembly.")]
@@ -39,4 +40,15 @@ public static Type GetTypeWithTrimFriendlyErrorMessage(string typeName)
39
40
thrownewInvalidOperationException($"Unable to load type '{typeName}'. If the app is published with trimming then this type may have been trimmed. Ensure the type's assembly is excluded from trimming.",ex);
// Some exceptions are thrown regardless of the value of throwOnError.
108
-
// For example, if the type is found but cannot be loaded,
109
-
// a System.TypeLoadException is thrown even if throwOnError is false.
110
-
type=_getType(resolvedTypeName);
111
-
returntypeis not null;
112
-
}
113
-
catch
114
-
{
115
-
type=default;
116
-
returnfalse;
117
-
}
118
-
}
119
-
120
-
[UnconditionalSuppressMessage("Trimmer","IL2057",Justification="Type.GetType result is only useful with types that are referenced by DataProtection assembly.")]
Copy file name to clipboardExpand all lines: src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/XmlEncryption/XmlEncryptionExtensionsTests.cs
+68-6
Original file line number
Diff line number
Diff line change
@@ -50,14 +50,9 @@ public void DecryptElement_RootNodeRequiresDecryption_Success()
0 commit comments