Remove Contract.EndContractBlock and parameter check that gets handled in the base...
authorViktor Hofer <viktor.hofer@outlook.com>
Wed, 4 Oct 2017 13:02:02 +0000 (15:02 +0200)
committerViktor Hofer <viktor.hofer@outlook.com>
Wed, 4 Oct 2017 13:02:02 +0000 (15:02 +0200)
src/mscorlib/shared/System/Runtime/CompilerServices/RuntimeWrappedException.cs
src/mscorlib/src/System/MissingMemberException.cs
src/mscorlib/src/System/TypeLoadException.cs

index c86a232..af3b0c9 100644 (file)
@@ -28,11 +28,6 @@ namespace System.Runtime.CompilerServices
 
         public override void GetObjectData(SerializationInfo info, StreamingContext context)
         {
-            if (info == null)
-            {
-                throw new ArgumentNullException(nameof(info));
-            }
-            Contract.EndContractBlock();
             base.GetObjectData(info, context);
             info.AddValue("WrappedException", _wrappedException, typeof(object));
         }
index c818169..95ad711 100644 (file)
@@ -78,11 +78,6 @@ namespace System
 
         public override void GetObjectData(SerializationInfo info, StreamingContext context)
         {
-            if (info == null)
-            {
-                throw new ArgumentNullException(nameof(info));
-            }
-            Contract.EndContractBlock();
             base.GetObjectData(info, context);
             info.AddValue("MMClassName", ClassName, typeof(string));
             info.AddValue("MMSignature", Signature, typeof(byte[]));
index 13f8651..cbac2fe 100644 (file)
@@ -108,7 +108,7 @@ namespace System
         {
             if (info == null)
                 throw new ArgumentNullException(nameof(info));
-            Contract.EndContractBlock();
+
             ClassName = info.GetString("TypeLoadClassName");
             AssemblyName = info.GetString("TypeLoadAssemblyName");
             MessageArg = info.GetString("TypeLoadMessageArg");
@@ -121,10 +121,6 @@ namespace System
 
         public override void GetObjectData(SerializationInfo info, StreamingContext context)
         {
-            if (info == null)
-                throw new ArgumentNullException(nameof(info));
-            Contract.EndContractBlock();
-
             base.GetObjectData(info, context);
             info.AddValue("TypeLoadClassName", ClassName, typeof(string));
             info.AddValue("TypeLoadAssemblyName", AssemblyName, typeof(string));