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

◆ Invoke() [3/6]

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

Definition at line 330 of file RuntimeConstructorInfo.cs.

331 {
332 INVOCATION_FLAGS invocationFlags = InvocationFlags;
333 if ((invocationFlags & INVOCATION_FLAGS.INVOCATION_FLAGS_NO_INVOKE) != 0)
334 {
336 }
338 if ((invocationFlags & INVOCATION_FLAGS.INVOCATION_FLAGS_RUN_CLASS_CONSTRUCTOR) != 0)
339 {
341 if (declaringType != null)
342 {
344 }
345 else
346 {
348 }
349 return null;
350 }
352 int num = signature.Arguments.Length;
353 int num2 = ((parameters != null) ? parameters.Length : 0);
354 if (num != num2)
355 {
356 throw new TargetParameterCountException(SR.Arg_ParmCnt);
357 }
358 bool wrapExceptions = (invokeAttr & BindingFlags.DoNotWrapExceptions) == 0;
359 StackAllocedArguments stackArgs = default(StackAllocedArguments);
361 if (num2 != 0)
362 {
364 }
365 object result = RuntimeMethodHandle.InvokeMethod(obj, in arguments, signature, constructor: false, wrapExceptions);
366 for (int i = 0; i < arguments.Length; i++)
367 {
368 parameters[i] = arguments[i];
369 }
370 return result;
371 }
Span< object > CheckArguments(ref StackAllocedArguments stackArgs, ReadOnlySpan< object > parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
static void RunClassConstructor(QCallTypeHandle type)
static void RunModuleConstructor(QCallModule module)

References System.SR.Arg_ParmCnt, System.Reflection.MethodBase.CheckArguments(), System.Reflection.RuntimeConstructorInfo.CheckConsistency(), System.culture, System.Reflection.RuntimeConstructorInfo.DeclaringType, System.Reflection.RuntimeConstructorInfo.InvocationFlags, System.RuntimeMethodHandle.InvokeMethod(), System.Reflection.Module.ModuleHandle, System.obj, System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(), System.Runtime.CompilerServices.RuntimeHelpers.RunModuleConstructor(), System.Reflection.RuntimeConstructorInfo.Signature, and System.Reflection.RuntimeConstructorInfo.ThrowNoInvokeException().