public RuntimeMethodHandle ResolveMethodHandle(int methodToken, RuntimeTypeHandle[]?typeInstantiationContext, RuntimeTypeHandle[]?methodInstantiationContext) { if (value == IntPtr.Zero) { throw new ArgumentNullException(string.Empty, "Invalid handle"); } IntPtr res = RuntimeModule.ResolveMethodToken(value, methodToken, ptrs_from_handles(typeInstantiationContext), ptrs_from_handles(methodInstantiationContext), out _); if (res == IntPtr.Zero) { throw new Exception(string.Format("Could not load method '0x{0:x}' from assembly '0x{1:x}'", methodToken, value.ToInt64())); } else { return(new RuntimeMethodHandle(res)); } }