37 public override bool Equals([NotNullWhen(
true)]
object?
obj)
43 return moduleHandle.m_ptr ==
m_ptr;
48 return handle.m_ptr ==
m_ptr;
58 return !left.
Equals(right);
69 if ((
object)module ==
null)
71 ThrowInvalidOperationException();
75 static void ThrowInvalidOperationException()
81 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
87 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
93 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
102 if (typeInstantiationContext !=
null && typeInstantiationContext.Length != 0)
104 typeInstantiationContext = (
RuntimeTypeHandle[])typeInstantiationContext.Clone();
107 if (methodInstantiationContext !=
null && methodInstantiationContext.Length != 0)
109 methodInstantiationContext = (
RuntimeTypeHandle[])methodInstantiationContext.Clone();
114 fixed (
IntPtr* methodInstArgs = array2)
139 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
145 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
151 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
155 typeInstantiationContext = (
RuntimeTypeHandle[])typeInstantiationContext?.Clone();
156 methodInstantiationContext = (
RuntimeTypeHandle[])methodInstantiationContext?.Clone();
173 fixed (
IntPtr* typeInstArgs = typeInstantiationContext)
175 fixed (
IntPtr* methodInstArgs = methodInstantiationContext)
177 return ResolveMethod(
new QCallModule(ref module), methodToken, typeInstArgs, typeInstCount, methodInstArgs, methodInstCount);
194 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
200 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
206 [RequiresUnreferencedCode(
"Trimming changes metadata tokens")]
215 if (typeInstantiationContext !=
null && typeInstantiationContext.Length != 0)
217 typeInstantiationContext = (
RuntimeTypeHandle[])typeInstantiationContext.Clone();
220 if (methodInstantiationContext !=
null && methodInstantiationContext.Length != 0)
222 methodInstantiationContext = (
RuntimeTypeHandle[])methodInstantiationContext.Clone();
227 fixed (
IntPtr* methodInstArgs = array2)
static void KeepAlive(object? obj)
override int GetHashCode()
static string Format(string resourceFormat, object p1)
static string Argument_InvalidToken
static string InvalidOperation_NullModuleHandle
static void ValidateModulePointer(RuntimeModule module)
static unsafe void GetPEKind(RuntimeModule module, out PortableExecutableKinds peKind, out ImageFileMachine machine)
static RuntimeType GetModuleType(RuntimeModule module)
RuntimeTypeHandle ResolveTypeHandle(int typeToken)
RuntimeModule GetRuntimeModule()
ModuleHandle(RuntimeModule module)
RuntimeFieldHandle ResolveFieldHandle(int fieldToken)
static void GetModuleType(QCallModule handle, ObjectHandleOnStack type)
static unsafe RuntimeMethodHandleInternal ResolveMethodHandleInternal(RuntimeModule module, int methodToken, IntPtr[] typeInstantiationContext, int typeInstCount, IntPtr[] methodInstantiationContext, int methodInstCount)
static bool operator!=(ModuleHandle left, ModuleHandle right)
override int GetHashCode()
override bool Equals([NotNullWhen(true)] object? obj)
static bool operator==(ModuleHandle left, ModuleHandle right)
RuntimeFieldHandle GetRuntimeFieldHandleFromMetadataToken(int fieldToken)
static unsafe void ResolveType(QCallModule module, int typeToken, IntPtr *typeInstArgs, int typeInstCount, IntPtr *methodInstArgs, int methodInstCount, ObjectHandleOnStack type)
RuntimeMethodHandle ResolveMethodHandle(int methodToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext)
unsafe RuntimeTypeHandle ResolveTypeHandle(int typeToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext)
readonly RuntimeModule m_ptr
static unsafe RuntimeMethodHandleInternal ResolveMethod(QCallModule module, int methodToken, IntPtr *typeInstArgs, int typeInstCount, IntPtr *methodInstArgs, int methodInstCount)
static unsafe void GetPEKind(QCallModule handle, int *peKind, int *machine)
static readonly ModuleHandle EmptyHandle
static int GetToken(RuntimeModule module)
unsafe RuntimeFieldHandle ResolveFieldHandle(int fieldToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext)
static IRuntimeMethodInfo GetDynamicMethod(DynamicMethod method, RuntimeModule module, string name, byte[] sig, Resolver resolver)
static unsafe void ResolveField(QCallModule module, int fieldToken, IntPtr *typeInstArgs, int typeInstCount, IntPtr *methodInstArgs, int methodInstCount, ObjectHandleOnStack retField)
RuntimeTypeHandle GetRuntimeTypeHandleFromMetadataToken(int typeToken)
bool Equals(ModuleHandle handle)
static bool ContainsPropertyMatchingHash(RuntimeModule module, int propertyToken, uint hash)
static MetadataImport GetMetadataImport(RuntimeModule module)
RuntimeMethodHandle GetRuntimeMethodHandleFromMetadataToken(int methodToken)
static int GetMDStreamVersion(RuntimeModule module)
static IntPtr _GetMetadataImport(RuntimeModule module)
RuntimeMethodHandle ResolveMethodHandle(int methodToken)
static Interop.BOOL _ContainsPropertyMatchingHash(QCallModule module, int propertyToken, uint hash)
static LoaderAllocator GetLoaderAllocator(RuntimeMethodHandleInternal method)
static IntPtr[] CopyRuntimeTypeHandles(RuntimeTypeHandle[] inHandles, out int length)