Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ ResolveMethodHandle() [2/2]

RuntimeMethodHandle System.ModuleHandle.ResolveMethodHandle ( int methodToken,
RuntimeTypeHandle?[] typeInstantiationContext,
RuntimeTypeHandle?[] methodInstantiationContext )
inline

Definition at line 152 of file ModuleHandle.cs.

153 {
154 RuntimeModule runtimeModule = GetRuntimeModule();
155 typeInstantiationContext = (RuntimeTypeHandle[])typeInstantiationContext?.Clone();
156 methodInstantiationContext = (RuntimeTypeHandle[])methodInstantiationContext?.Clone();
157 int length;
158 IntPtr[] typeInstantiationContext2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out length);
159 int length2;
160 IntPtr[] methodInstantiationContext2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out length2);
161 RuntimeMethodHandleInternal runtimeMethodHandleInternal = ResolveMethodHandleInternal(runtimeModule, methodToken, typeInstantiationContext2, length, methodInstantiationContext2, length2);
162 IRuntimeMethodInfo method = new RuntimeMethodInfoStub(runtimeMethodHandleInternal, RuntimeMethodHandle.GetLoaderAllocator(runtimeMethodHandleInternal));
163 GC.KeepAlive(typeInstantiationContext);
164 GC.KeepAlive(methodInstantiationContext);
165 return new RuntimeMethodHandle(method);
166 }
RuntimeModule GetRuntimeModule()
static unsafe RuntimeMethodHandleInternal ResolveMethodHandleInternal(RuntimeModule module, int methodToken, IntPtr[] typeInstantiationContext, int typeInstCount, IntPtr[] methodInstantiationContext, int methodInstCount)

References System.RuntimeTypeHandle.CopyRuntimeTypeHandles(), System.RuntimeMethodHandle.GetLoaderAllocator(), System.ModuleHandle.GetRuntimeModule(), System.GC.KeepAlive(), System.length, System.length2, and System.ModuleHandle.ResolveMethodHandleInternal().