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

◆ Invoke() [1/3]

override object System.Reflection.RuntimeMethodInfo.Invoke ( object obj,
BindingFlags invokeAttr,
Binder binder,
object[] parameters,
CultureInfo culture )
inline

Definition at line 444 of file RuntimeMethodInfo.cs.

445 {
446 if ((InvocationFlags & (INVOCATION_FLAGS.INVOCATION_FLAGS_NO_INVOKE | INVOCATION_FLAGS.INVOCATION_FLAGS_CONTAINS_STACK_POINTERS)) != 0)
447 {
449 }
452 int num = ((parameters != null) ? parameters.Length : 0);
453 if (signature.Arguments.Length != num)
454 {
455 throw new TargetParameterCountException(SR.Arg_ParmCnt);
456 }
457 StackAllocedArguments stackArgs = default(StackAllocedArguments);
459 if (num != 0)
460 {
462 }
463 bool wrapExceptions = (invokeAttr & BindingFlags.DoNotWrapExceptions) == 0;
464 object result = RuntimeMethodHandle.InvokeMethod(obj, in arguments, Signature, constructor: false, wrapExceptions);
465 for (int i = 0; i < arguments.Length; i++)
466 {
467 parameters[i] = arguments[i];
468 }
469 return result;
470 }
Span< object > CheckArguments(ref StackAllocedArguments stackArgs, ReadOnlySpan< object > parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)

References System.SR.Arg_ParmCnt, System.Reflection.MethodBase.CheckArguments(), System.Reflection.RuntimeMethodInfo.CheckConsistency(), System.culture, System.Reflection.RuntimeMethodInfo.InvocationFlags, System.RuntimeMethodHandle.InvokeMethod(), System.obj, System.Reflection.RuntimeMethodInfo.Signature, and System.Reflection.RuntimeMethodInfo.ThrowNoInvokeException().