Revert "Correct parameter names."
authorJan Kotas <jkotas@microsoft.com>
Wed, 2 Nov 2016 14:06:30 +0000 (07:06 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 2 Nov 2016 14:06:30 +0000 (07:06 -0700)
This reverts commit dotnet/coreclr@0cae769f3c60bf2a696d02a88527a46d5b211cd5.

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

src/coreclr/src/mscorlib/src/System/Diagnostics/Eventing/TraceLogging/TraceLoggingTypeInfo.cs
src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs
src/coreclr/src/mscorlib/src/System/IO/Directory.cs
src/coreclr/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
src/coreclr/src/mscorlib/src/System/Reflection/Emit/SignatureHelper.cs
src/coreclr/src/mscorlib/src/System/Reflection/RuntimeReflectionExtensions.cs

index d68e106..0cc17e0 100644 (file)
@@ -61,7 +61,7 @@ namespace System.Diagnostics.Tracing
 
             if (name == null)
             {
-                throw new ArgumentNullException(nameof(name));
+                throw new ArgumentNullException("eventName");
             }
 
             Contract.EndContractBlock();
index 3fb32e0..137d0e4 100644 (file)
@@ -1370,7 +1370,7 @@ namespace System.Globalization {
             Contract.Requires(values.Length >= length);
             for (int i = 0; i < length; i++) {
                 if (values[i] == null) {
-                    throw new ArgumentNullException("values[" + i + "]",
+                    throw new ArgumentNullException("value",
                         Environment.GetResourceString("ArgumentNull_ArrayValue"));
                 }
             }
index d970805..03f9a1e 100644 (file)
@@ -1054,7 +1054,7 @@ namespace System.IO {
         public static void SetCurrentDirectory(String path)
         {
             if (path==null)
-                throw new ArgumentNullException(nameof(path));
+                throw new ArgumentNullException("value");
             if (path.Length==0)
                 throw new ArgumentException(Environment.GetResourceString("Argument_PathEmpty"));
             Contract.EndContractBlock();
index df90041..d2a95b0 100644 (file)
@@ -2061,7 +2061,7 @@ namespace System.Reflection.Emit
         private FieldToken GetFieldTokenNoLock(FieldInfo field) 
         {
             if (field == null) {
-                throw new ArgumentNullException(nameof(field));
+                throw new ArgumentNullException("con");
             }
             Contract.EndContractBlock();
 
index f6324c9..b2a3493 100644 (file)
@@ -193,15 +193,15 @@ namespace System.Reflection.Emit
         }
         
         [System.Security.SecurityCritical]  // auto-generated
-        internal static SignatureHelper GetTypeSigToken(Module module, Type type)
+        internal static SignatureHelper GetTypeSigToken(Module mod, Type type)
         {
-            if (module == null)
-                throw new ArgumentNullException(nameof(module));
+            if (mod == null)
+                throw new ArgumentNullException("module");
 
             if (type == null)
                 throw new ArgumentNullException(nameof(type));
 
-            return new SignatureHelper(module, type);
+            return new SignatureHelper(mod, type);
         }
         #endregion
 
index 4926263..00ab975 100644 (file)
@@ -10,16 +10,16 @@ namespace System.Reflection
     {
         private const BindingFlags everything = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
 
-        private static void CheckAndThrow(Type type)
+        private static void CheckAndThrow(Type t)
         {
-            if (type == null) throw new ArgumentNullException(nameof(type));
-            if (!(type is RuntimeType)) throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeType"));
+            if (t == null) throw new ArgumentNullException("type");
+            if (!(t is RuntimeType)) throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeType"));
         }
 
-        private static void CheckAndThrow(MethodInfo method)
+        private static void CheckAndThrow(MethodInfo m)
         {
-            if (method == null) throw new ArgumentNullException(nameof(method));
-            if (!(method is RuntimeMethodInfo)) throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeMethodInfo"));
+            if (m == null) throw new ArgumentNullException("method");
+            if (!(m is RuntimeMethodInfo)) throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeMethodInfo"));
         }
 
         public static IEnumerable<PropertyInfo> GetRuntimeProperties(this Type type)