Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
ifdef out CodeAccessPermission demand used in SerializationInfo on Co…
Browse files Browse the repository at this point in the history
…reCLR

It brings in an FCall not available on coreclr.
  • Loading branch information
stephentoub committed Jul 21, 2016
1 parent 292d4ea commit e95a6e8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ private static bool Compare(byte[] a, byte[] b)
[SecuritySafeCritical]
internal static void DemandForUnsafeAssemblyNameAssignments(string originalAssemblyName, string newAssemblyName)
{
#if !FEATURE_CORECLR
if (!IsAssemblyNameAssignmentSafe(originalAssemblyName, newAssemblyName))
{
CodeAccessPermission.Demand(PermissionType.SecuritySerialization);
}
#endif
}

internal static bool IsAssemblyNameAssignmentSafe(string originalAssemblyName, string newAssemblyName)
Expand Down

0 comments on commit e95a6e8

Please sign in to comment.