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

◆ Invoke() [1/6]

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

Definition at line 386 of file RuntimeConstructorInfo.cs.

387 {
388 INVOCATION_FLAGS invocationFlags = InvocationFlags;
389 if ((invocationFlags & (INVOCATION_FLAGS.INVOCATION_FLAGS_NO_INVOKE | INVOCATION_FLAGS.INVOCATION_FLAGS_NO_CTOR_INVOKE | INVOCATION_FLAGS.INVOCATION_FLAGS_CONTAINS_STACK_POINTERS)) != 0)
390 {
392 }
394 int num = signature.Arguments.Length;
395 int num2 = ((parameters != null) ? parameters.Length : 0);
396 if (num != num2)
397 {
398 throw new TargetParameterCountException(SR.Arg_ParmCnt);
399 }
400 bool wrapExceptions = (invokeAttr & BindingFlags.DoNotWrapExceptions) == 0;
401 StackAllocedArguments stackArgs = default(StackAllocedArguments);
403 if (num2 != 0)
404 {
406 }
407 object result = RuntimeMethodHandle.InvokeMethod(null, in arguments, signature, constructor: true, wrapExceptions);
408 for (int i = 0; i < arguments.Length; i++)
409 {
410 parameters[i] = arguments[i];
411 }
412 return result;
413 }
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.culture, System.Reflection.RuntimeConstructorInfo.InvocationFlags, System.RuntimeMethodHandle.InvokeMethod(), System.Reflection.RuntimeConstructorInfo.Signature, and System.Reflection.RuntimeConstructorInfo.ThrowNoInvokeException().