Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MakeGenericMethod()

override MethodInfo System.Reflection.RuntimeMethodInfo.MakeGenericMethod ( params Type[] methodInstantiation)
inlinevirtual

Reimplemented from System.Reflection.MethodInfo.

Definition at line 551 of file RuntimeMethodInfo.cs.

552 {
553 if (methodInstantiation == null)
554 {
555 throw new ArgumentNullException("methodInstantiation");
556 }
557 RuntimeType[] array = new RuntimeType[methodInstantiation.Length];
559 {
560 throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
561 }
562 for (int i = 0; i < methodInstantiation.Length; i++)
563 {
565 if (type == null)
566 {
567 throw new ArgumentNullException();
568 }
569 RuntimeType runtimeType = type as RuntimeType;
570 if (runtimeType == null)
571 {
572 Type[] array2 = new Type[methodInstantiation.Length];
573 for (int j = 0; j < methodInstantiation.Length; j++)
574 {
576 }
579 }
581 }
583 RuntimeType.SanityCheckGenericArguments(array, genericArgumentsInternal);
584 MethodInfo methodInfo = null;
585 try
586 {
587 return RuntimeType.GetMethodBase(ReflectedTypeInternal, RuntimeMethodHandle.GetStubIfNeeded(new RuntimeMethodHandleInternal(m_handle), m_declaringType, array)) as MethodInfo;
588 }
589 catch (VerificationException e)
590 {
591 RuntimeType.ValidateGenericArguments(this, array, e);
592 throw;
593 }
594 }
static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst)

References System.SR.Arg_NotGenericMethodDefinition, System.array, System.SR.Format(), System.Reflection.RuntimeMethodInfo.GetGenericArgumentsInternal(), System.RuntimeType.GetMethodBase(), System.RuntimeMethodHandle.GetStubIfNeeded(), System.Reflection.RuntimeMethodInfo.IsGenericMethodDefinition, System.Reflection.RuntimeMethodInfo.m_declaringType, System.Reflection.RuntimeMethodInfo.m_handle, System.Reflection.Emit.MethodBuilderInstantiation.MakeGenericMethod(), System.Reflection.RuntimeMethodInfo.ReflectedTypeInternal, System.RuntimeType.SanityCheckGenericArguments(), System.type, and System.RuntimeType.ValidateGenericArguments().