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

◆ MakeNewCustomDelegate()

static Type System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewCustomDelegate ( Type[] types)
inlinestaticprivate

Definition at line 93 of file DelegateHelpers.cs.

94 {
95 Type returnType = types[^1];
96 Type[] parameterTypes = types.RemoveLast();
97 TypeBuilder typeBuilder = AssemblyGen.DefineDelegateType("Delegate" + types.Length);
99 typeBuilder.DefineMethod("Invoke", MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig | MethodAttributes.VtableLayoutMask, returnType, parameterTypes).SetImplementationFlags(MethodImplAttributes.CodeTypeMask);
100 return typeBuilder.CreateTypeInfo();
101 }
void SetImplementationFlags(MethodImplAttributes attributes)
static int DefineMethod(QCallModule module, int tkParent, string name, byte[] signature, int sigLength, MethodAttributes attributes)
ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes)

References System.Reflection.Emit.TypeBuilder.CreateTypeInfo(), System.Reflection.Emit.TypeBuilder.DefineConstructor(), System.Linq.Expressions.Compiler.AssemblyGen.DefineDelegateType(), System.Reflection.Emit.TypeBuilder.DefineMethod(), System.Linq.Expressions.Compiler.DelegateHelpers.s_delegateCtorSignature, and System.Reflection.Emit.ConstructorBuilder.SetImplementationFlags().

Referenced by System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate().