Fix full framework build break
authorJan Kotas <jkotas@microsoft.com>
Tue, 14 Jun 2016 22:48:53 +0000 (15:48 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 14 Jun 2016 22:48:53 +0000 (15:48 -0700)
[tfs-changeset: 1612754]

Commit migrated from https://github.com/dotnet/coreclr/commit/9b01b5fb1c61b62ab0bf4f9e9fb33f55cfa85a08

src/coreclr/src/mscorlib/src/System/Collections/Generic/Comparer.cs

index 5fea346..0b2745f 100644 (file)
@@ -10,6 +10,7 @@ using System.Collections.Generic;
 using System.Diagnostics.Contracts;
 //using System.Globalization;
 using System.Runtime.CompilerServices;
+using System.Security;
 using System.Runtime.Serialization;
 
 namespace System.Collections.Generic
@@ -214,7 +215,8 @@ namespace System.Collections.Generic
 
         public override int GetHashCode() =>
             GetType().GetHashCode();
-        
+
+        [SecurityCritical]
         public void GetObjectData(SerializationInfo info, StreamingContext context)
         {
             // Previously Comparer<T> was not specialized for enums,
@@ -249,7 +251,8 @@ namespace System.Collections.Generic
 
         public override int GetHashCode() =>
             GetType().GetHashCode();
-        
+
+        [SecurityCritical]
         public void GetObjectData(SerializationInfo info, StreamingContext context)
         {
             info.SetType(typeof(ObjectComparer<T>));
@@ -280,7 +283,8 @@ namespace System.Collections.Generic
 
         public override int GetHashCode() =>
             GetType().GetHashCode();
-        
+
+        [SecurityCritical]
         public void GetObjectData(SerializationInfo info, StreamingContext context)
         {
             info.SetType(typeof(ObjectComparer<T>));
@@ -311,7 +315,8 @@ namespace System.Collections.Generic
 
         public override int GetHashCode() =>
             GetType().GetHashCode();
-        
+
+        [SecurityCritical]
         public void GetObjectData(SerializationInfo info, StreamingContext context)
         {
             info.SetType(typeof(ObjectComparer<T>));