Internal\Reflection\Core\Execution\ExecutionEnvironment.cs (34)
37public abstract QTypeDefinition GetMetadataForNamedType(RuntimeTypeHandle runtimeTypeHandle);
38public abstract bool TryGetNamedTypeForMetadata(QTypeDefinition qTypeDefinition, out RuntimeTypeHandle runtimeTypeHandle);
40public abstract bool TryGetArrayTypeForElementType(RuntimeTypeHandle elementTypeHandle, out RuntimeTypeHandle arrayTypeHandle);
42public abstract bool TryGetMultiDimArrayTypeForElementType(RuntimeTypeHandle elementTypeHandle, int rank, out RuntimeTypeHandle arrayTypeHandle);
44public abstract bool TryGetFunctionPointerTypeForComponents(RuntimeTypeHandle returnTypeHandle, RuntimeTypeHandle[] parameterHandles, bool isUnmanaged, out RuntimeTypeHandle functionPointerTypeHandle);
46public abstract bool TryGetPointerTypeForTargetType(RuntimeTypeHandle targetTypeHandle, out RuntimeTypeHandle pointerTypeHandle);
48public abstract bool TryGetByRefTypeForTargetType(RuntimeTypeHandle targetTypeHandle, out RuntimeTypeHandle byRefTypeHandle);
50public abstract bool TryGetConstructedGenericTypeForComponents(RuntimeTypeHandle genericTypeDefinitionHandle, RuntimeTypeHandle[] genericTypeArgumentHandles, out RuntimeTypeHandle runtimeTypeHandle);
51public abstract bool TryGetConstructedGenericTypeForComponentsNoConstraintCheck(RuntimeTypeHandle genericTypeDefinitionHandle, RuntimeTypeHandle[] genericTypeArgumentHandles, out RuntimeTypeHandle runtimeTypeHandle);
57public abstract MethodBaseInvoker TryGetMethodInvokerNoConstraintCheck(RuntimeTypeHandle declaringTypeHandle, QMethodDefinition methodHandle, RuntimeTypeHandle[] genericMethodTypeArgumentHandles);
58public abstract FieldAccessor TryGetFieldAccessor(MetadataReader reader, RuntimeTypeHandle declaringTypeHandle, RuntimeTypeHandle fieldTypeHandle, FieldHandle fieldHandle);
63public abstract bool TryGetMethodFromHandle(RuntimeMethodHandle runtimeMethodHandle, out RuntimeTypeHandle declaringTypeHandle, out QMethodDefinition methodHandle, out RuntimeTypeHandle[] genericMethodTypeArgumentHandles);
64public abstract bool TryGetMethodFromHandleAndType(RuntimeMethodHandle runtimeMethodHandle, RuntimeTypeHandle declaringTypeHandle, out QMethodDefinition methodHandle, out RuntimeTypeHandle[] genericMethodTypeArgumentHandles);
65public abstract bool TryGetFieldFromHandle(RuntimeFieldHandle runtimeFieldHandle, out RuntimeTypeHandle declaringTypeHandle, out FieldHandle fieldHandle);
66public abstract bool TryGetFieldFromHandleAndType(RuntimeFieldHandle runtimeFieldHandle, RuntimeTypeHandle declaringTypeHandle, out FieldHandle fieldHandle);
79public abstract FieldAccessor CreateLiteralFieldAccessor(object value, RuntimeTypeHandle fieldTypeHandle);
83public abstract IntPtr GetStaticClassConstructionContext(RuntimeTypeHandle typeHandle);
104RuntimeTypeHandle typeDefinitionHandle = declaringType.TypeHandle;
105RuntimeTypeHandle[] genericMethodTypeArgumentHandles = new RuntimeTypeHandle[genericMethodTypeArguments.Length];
Internal\Runtime\Augments\RuntimeAugments.cs (74)
69public static object RawNewObject(RuntimeTypeHandle typeHandle)
91public static Array NewArray(RuntimeTypeHandle typeHandleForArrayType, int count)
113public static unsafe Array NewMultiDimArray(RuntimeTypeHandle typeHandleForArrayType, int[] lengths, int[]? lowerBounds)
169public static IntPtr GetAllocateObjectHelperForType(RuntimeTypeHandle type)
182public static Delegate CreateDelegate(RuntimeTypeHandle typeHandleForDelegate, IntPtr ldftnResult, object thisObject, bool isStatic, bool isOpen)
190public static IntPtr GetDelegateLdFtnResult(Delegate d, out RuntimeTypeHandle typeOfFirstParameterIfInstanceDelegate, out bool isOpenResolver)
217public static IntPtr GetPointerFromTypeHandle(RuntimeTypeHandle typeHandle)
222public static unsafe TypeManagerHandle GetModuleFromTypeHandle(RuntimeTypeHandle typeHandle)
227public static unsafe RuntimeTypeHandle CreateRuntimeTypeHandle(IntPtr ldTokenResult)
232public static unsafe void StoreValueTypeField(IntPtr address, object fieldValue, RuntimeTypeHandle fieldType)
237public static unsafe object LoadValueTypeField(IntPtr address, RuntimeTypeHandle fieldType)
242public static unsafe object LoadPointerTypeField(IntPtr address, RuntimeTypeHandle fieldType)
250public static unsafe void StoreValueTypeField(object obj, int fieldOffset, object fieldValue, RuntimeTypeHandle fieldType)
256public static unsafe object LoadValueTypeField(object obj, int fieldOffset, RuntimeTypeHandle fieldType)
262public static unsafe object LoadPointerTypeField(object obj, int fieldOffset, RuntimeTypeHandle fieldType)
295public static void StoreValueTypeFieldValueIntoValueType(TypedReference typedReference, int fieldOffset, object fieldValue, RuntimeTypeHandle fieldTypeHandle)
303public static object LoadValueTypeFieldValueFromValueType(TypedReference typedReference, int fieldOffset, RuntimeTypeHandle fieldTypeHandle)
328public static unsafe object LoadPointerTypeFieldValueFromValueType(TypedReference typedReference, int fieldOffset, RuntimeTypeHandle fieldTypeHandle)
358public static RuntimeTypeHandle GetRelatedParameterTypeHandle(RuntimeTypeHandle parameterTypeHandle)
364public static unsafe int GetArrayRankOrMinusOneForSzArray(RuntimeTypeHandle arrayHandle)
370public static bool IsValueType(RuntimeTypeHandle type)
375public static bool IsInterface(RuntimeTypeHandle type)
380public static unsafe object Box(RuntimeTypeHandle type, IntPtr address)
393public static RuntimeTypeHandle ProjectionTypeForArrays
404public static bool IsAssignableFrom(RuntimeTypeHandle dstType, RuntimeTypeHandle srcType)
418public static bool TryGetBaseType(RuntimeTypeHandle typeHandle, out RuntimeTypeHandle baseTypeHandle)
423baseTypeHandle = default(RuntimeTypeHandle);
430public static int GetGCDescSize(RuntimeTypeHandle typeHandle)
435public static int GetInterfaceCount(RuntimeTypeHandle typeHandle)
440public static RuntimeTypeHandle GetInterface(RuntimeTypeHandle typeHandle, int index)
446public static RuntimeTypeHandle GetCanonType()
452public static RuntimeTypeHandle GetGenericDefinition(RuntimeTypeHandle typeHandle)
459public static RuntimeTypeHandle GetGenericArgument(RuntimeTypeHandle typeHandle, int argumentIndex)
466public static RuntimeTypeHandle GetGenericInstantiation(RuntimeTypeHandle typeHandle, out RuntimeTypeHandle[] genericTypeArgumentHandles)
473genericTypeArgumentHandles = new RuntimeTypeHandle[eeType->GenericArity];
482public static bool IsGenericType(RuntimeTypeHandle typeHandle)
487public static bool IsArrayType(RuntimeTypeHandle typeHandle)
492public static bool IsByRefLike(RuntimeTypeHandle typeHandle) => typeHandle.ToMethodTable()->IsByRefLike;
494public static bool IsDynamicType(RuntimeTypeHandle typeHandle)
499public static unsafe IntPtr ResolveStaticDispatchOnType(RuntimeTypeHandle instanceType, RuntimeTypeHandle interfaceType, int slot, out RuntimeTypeHandle genericContext)
510public static unsafe IntPtr ResolveDispatchOnType(RuntimeTypeHandle instanceType, RuntimeTypeHandle interfaceType, int slot)
515public static bool IsUnmanagedPointerType(RuntimeTypeHandle typeHandle)
520public static bool IsFunctionPointerType(RuntimeTypeHandle typeHandle)
525public static unsafe RuntimeTypeHandle GetFunctionPointerReturnType(RuntimeTypeHandle typeHandle)
530public static unsafe int GetFunctionPointerParameterCount(RuntimeTypeHandle typeHandle)
535public static unsafe RuntimeTypeHandle GetFunctionPointerParameterType(RuntimeTypeHandle typeHandle, int argumentIndex)
541public static unsafe RuntimeTypeHandle[] GetFunctionPointerParameterTypes(RuntimeTypeHandle typeHandle)
545return Array.Empty<RuntimeTypeHandle>();
547RuntimeTypeHandle[] result = new RuntimeTypeHandle[paramCount];
557public static unsafe bool IsUnmanagedFunctionPointerType(RuntimeTypeHandle typeHandle)
562public static bool IsByRefType(RuntimeTypeHandle typeHandle)
567public static bool IsGenericTypeDefinition(RuntimeTypeHandle typeHandle)
572public static object CheckArgument(object srcObject, RuntimeTypeHandle dstType, BinderBundle? binderBundle)
577public static object CheckArgument(object srcObject, RuntimeTypeHandle dstType, BinderBundle? binderBundle, out bool copyBack)
584public static object CheckArgumentForDirectFieldAccess(object srcObject, RuntimeTypeHandle dstType)
589public static bool IsAssignable(object srcObject, RuntimeTypeHandle dstType)
598public static bool IsNullable(RuntimeTypeHandle declaringTypeHandle)
603public static RuntimeTypeHandle GetNullableType(RuntimeTypeHandle nullableType)
Internal\Runtime\Augments\TypeLoaderCallbacks.cs (15)
18public abstract bool TryGetOwningTypeForMethodDictionary(IntPtr dictionary, out RuntimeTypeHandle owningType);
20public abstract bool TryGetConstructedGenericTypeForComponents(RuntimeTypeHandle genericTypeDefinitionHandle, RuntimeTypeHandle[] genericTypeArgumentHandles, out RuntimeTypeHandle runtimeTypeHandle);
23public abstract RuntimeMethodHandle GetRuntimeMethodHandleForComponents(RuntimeTypeHandle declaringTypeHandle, MethodHandle handle, RuntimeTypeHandle[] genericMethodArgs);
24public abstract IntPtr TryGetDefaultConstructorForType(RuntimeTypeHandle runtimeTypeHandle);
25public abstract unsafe IntPtr ResolveGenericVirtualMethodTarget(RuntimeTypeHandle targetTypeHandle, RuntimeTypeHandle declaringTypeHandle, MethodHandle methodHandle, bool isAsyncVariant, void* methodInstantiation, bool isMethodInstantiationDataRelative);
26public abstract RuntimeFieldHandle GetRuntimeFieldHandleForComponents(RuntimeTypeHandle declaringTypeHandle, FieldHandle handle);
27public abstract bool TryGetPointerTypeForTargetType(RuntimeTypeHandle pointeeTypeHandle, out RuntimeTypeHandle pointerTypeHandle);
28public abstract bool TryGetArrayTypeForElementType(RuntimeTypeHandle elementTypeHandle, bool isMdArray, int rank, out RuntimeTypeHandle arrayTypeHandle);
32public abstract IntPtr ConvertUnboxingFunctionPointerToUnderlyingNonUnboxingPointer(IntPtr unboxingFunctionPointer, RuntimeTypeHandle declaringType);
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (12)
17public static uint GetStructFieldOffset(RuntimeTypeHandle structureTypeHandle, string fieldName)
53public static unsafe int GetStructUnsafeStructSize(RuntimeTypeHandle structureTypeHandle)
87public static IntPtr GetStructUnmarshalStub(RuntimeTypeHandle structureTypeHandle)
93public static IntPtr GetStructMarshalStub(RuntimeTypeHandle structureTypeHandle)
99public static IntPtr GetDestroyStructureStub(RuntimeTypeHandle structureTypeHandle)
105public static IntPtr GetForwardDelegateCreationStub(RuntimeTypeHandle delegateTypeHandle)
113public static IntPtr GetDelegateMarshallingStub(RuntimeTypeHandle delegateTypeHandle, bool openStaticDelegate)
137private static unsafe bool GetMarshallersForDelegate(RuntimeTypeHandle delegateTypeHandle, out IntPtr openStub, out IntPtr closedStub, out IntPtr delegateCreationStub)
159RuntimeTypeHandle foundDelegateType = externalReferences.GetRuntimeTypeHandleFromIndex(entryParser.GetUnsigned());
173private static unsafe bool TryGetStructData(RuntimeTypeHandle structTypeHandle, out ExternalReferencesTable externalReferences, out NativeParser entryParser)
191RuntimeTypeHandle foundStructType = externalReferences.GetRuntimeTypeHandleFromIndex(entryParser.GetUnsigned());
202private static unsafe void GetMarshallersForStruct(RuntimeTypeHandle structTypeHandle, out IntPtr marshalStub, out IntPtr unmarshalStub, out IntPtr destroyStub)
Internal\Runtime\CompilerServices\OpenMethodResolver.cs (5)
34public OpenMethodResolver(RuntimeTypeHandle declaringTypeOfSlot, int slot, GCHandle readerGCHandle, int handle)
45public OpenMethodResolver(RuntimeTypeHandle declaringTypeOfSlot, RuntimeMethodHandle gvmSlot, GCHandle readerGCHandle, int handle)
55public OpenMethodResolver(RuntimeTypeHandle declaringType, IntPtr codePointer, GCHandle readerGCHandle, int handle, short resolveType)
78public RuntimeTypeHandle DeclaringType
165public static IntPtr ResolveMethod(IntPtr resolverPtr, RuntimeTypeHandle thisType)
System\Reflection\Runtime\General\TypeUnifier.cs (46)
75public static RuntimeTypeInfo GetRuntimeTypeInfoForRuntimeTypeHandle(this RuntimeTypeHandle typeHandle)
94internal static RuntimeArrayTypeInfo GetArrayTypeInfo(RuntimeTypeInfo elementType, bool multiDim, int rank, RuntimeTypeHandle precomputedTypeHandle)
108private static RuntimeTypeHandle GetRuntimeTypeHandleIfAny(RuntimeTypeInfo elementType, bool multiDim, int rank)
112RuntimeTypeHandle elementTypeHandle = elementType.InternalTypeHandleIfAvailable;
114return default(RuntimeTypeHandle);
124RuntimeTypeHandle typeHandle;
128return default(RuntimeTypeHandle);
133return default(RuntimeTypeHandle);
201internal static RuntimeByRefTypeInfo GetByRefTypeInfo(RuntimeTypeInfo elementType, RuntimeTypeHandle precomputedTypeHandle)
208private static RuntimeTypeHandle GetRuntimeTypeHandleIfAny(RuntimeTypeInfo elementType)
210RuntimeTypeHandle elementTypeHandle = elementType.InternalTypeHandleIfAvailable;
212return default(RuntimeTypeHandle);
214RuntimeTypeHandle typeHandle;
216return default(RuntimeTypeHandle);
245internal static RuntimePointerTypeInfo GetPointerTypeInfo(RuntimeTypeInfo elementType, RuntimeTypeHandle precomputedTypeHandle)
252private static RuntimeTypeHandle GetRuntimeTypeHandleIfAny(RuntimeTypeInfo elementType)
254RuntimeTypeHandle elementTypeHandle = elementType.InternalTypeHandleIfAvailable;
256return default(RuntimeTypeHandle);
258RuntimeTypeHandle typeHandle;
260return default(RuntimeTypeHandle);
286RuntimeTypeHandle precomputedTypeHandle = GetRuntimeTypeHandleIfAny(returnType, parameterTypes, isUnmanaged);
290internal static RuntimeFunctionPointerTypeInfo GetFunctionPointerTypeInfo(RuntimeTypeInfo returnType, RuntimeTypeInfo[] parameterTypes, bool isUnmanaged, RuntimeTypeHandle precomputedTypeHandle)
298private static RuntimeTypeHandle GetRuntimeTypeHandleIfAny(RuntimeTypeInfo returnType, RuntimeTypeInfo[] parameterTypes, bool isUnmanaged)
300RuntimeTypeHandle returnTypeHandle = returnType.InternalTypeHandleIfAvailable;
302return default(RuntimeTypeHandle);
305RuntimeTypeHandle[] parameterTypeHandles = new RuntimeTypeHandle[count];
308RuntimeTypeHandle parameterHandle = parameterTypes[i].InternalTypeHandleIfAvailable;
310return default(RuntimeTypeHandle);
314if (ReflectionCoreExecution.ExecutionEnvironment.TryGetFunctionPointerTypeForComponents(returnTypeHandle, parameterTypeHandles, isUnmanaged, out RuntimeTypeHandle typeHandle))
317return default(RuntimeTypeHandle);
340RuntimeTypeHandle precomputedTypeHandle = GetRuntimeTypeHandleIfAny(genericTypeDefinition, genericTypeArguments, del);
348RuntimeTypeHandle precomputedTypeHandle = GetRuntimeTypeHandleIfAny(genericTypeDefinition, genericTypeArguments, del);
352internal static RuntimeConstructedGenericTypeInfo GetRuntimeConstructedGenericTypeInfo(RuntimeTypeInfo genericTypeDefinition, RuntimeTypeInfo[] genericTypeArguments, RuntimeTypeHandle precomputedTypeHandle)
360private delegate bool TryGetConstructedGenericTypeDelegate(RuntimeTypeHandle genericDefinition, RuntimeTypeHandle[] genericArguments, out RuntimeTypeHandle result);
362private static RuntimeTypeHandle GetRuntimeTypeHandleIfAny(RuntimeTypeInfo genericTypeDefinition, RuntimeTypeInfo[] genericTypeArguments, TryGetConstructedGenericTypeDelegate constructor)
364RuntimeTypeHandle genericTypeDefinitionHandle = genericTypeDefinition.InternalTypeHandleIfAvailable;
366return default(RuntimeTypeHandle);
369RuntimeTypeHandle[] genericTypeArgumentHandles = new RuntimeTypeHandle[count];
372RuntimeTypeHandle genericTypeArgumentHandle = genericTypeArguments[i].InternalTypeHandleIfAvailable;
374return default(RuntimeTypeHandle);
378RuntimeTypeHandle typeHandle;
380return default(RuntimeTypeHandle);