if (name == null)
{
- throw new ArgumentNullException(nameof(name));
+ throw new ArgumentNullException("eventName");
}
Contract.EndContractBlock();
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"));
}
}
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();
private FieldToken GetFieldTokenNoLock(FieldInfo field)
{
if (field == null) {
- throw new ArgumentNullException(nameof(field));
+ throw new ArgumentNullException("con");
}
Contract.EndContractBlock();
}
[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
{
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)