Internal\Reflection\Core\Execution\ExecutionEnvironment.cs (35)
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);
80public abstract void GetEnumInfo(RuntimeTypeHandle typeHandle, out string[] names, out object[] values, out bool isFlags);
84public abstract IntPtr GetStaticClassConstructionContext(RuntimeTypeHandle typeHandle);
105RuntimeTypeHandle typeDefinitionHandle = declaringType.TypeHandle;
106RuntimeTypeHandle[] 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 Type GetEnumUnderlyingType(RuntimeTypeHandle enumTypeHandle)
390public static RuntimeTypeHandle GetRelatedParameterTypeHandle(RuntimeTypeHandle parameterTypeHandle)
396public static unsafe int GetArrayRankOrMinusOneForSzArray(RuntimeTypeHandle arrayHandle)
402public static bool IsValueType(RuntimeTypeHandle type)
407public static bool IsInterface(RuntimeTypeHandle type)
412public static unsafe object Box(RuntimeTypeHandle type, IntPtr address)
425public static RuntimeTypeHandle ProjectionTypeForArrays
436public static bool IsAssignableFrom(RuntimeTypeHandle dstType, RuntimeTypeHandle srcType)
450public static bool TryGetBaseType(RuntimeTypeHandle typeHandle, out RuntimeTypeHandle baseTypeHandle)
455baseTypeHandle = default(RuntimeTypeHandle);
462public static int GetGCDescSize(RuntimeTypeHandle typeHandle)
467public static int GetInterfaceCount(RuntimeTypeHandle typeHandle)
472public static RuntimeTypeHandle GetInterface(RuntimeTypeHandle typeHandle, int index)
478public static RuntimeTypeHandle GetCanonType()
484public static RuntimeTypeHandle GetGenericDefinition(RuntimeTypeHandle typeHandle)
491public static RuntimeTypeHandle GetGenericArgument(RuntimeTypeHandle typeHandle, int argumentIndex)
498public static RuntimeTypeHandle GetGenericInstantiation(RuntimeTypeHandle typeHandle, out RuntimeTypeHandle[] genericTypeArgumentHandles)
505genericTypeArgumentHandles = new RuntimeTypeHandle[eeType->GenericArity];
514public static bool IsGenericType(RuntimeTypeHandle typeHandle)
519public static bool IsArrayType(RuntimeTypeHandle typeHandle)
524public static bool IsByRefLike(RuntimeTypeHandle typeHandle) => typeHandle.ToMethodTable()->IsByRefLike;
526public static bool IsDynamicType(RuntimeTypeHandle typeHandle)
531public static unsafe IntPtr ResolveStaticDispatchOnType(RuntimeTypeHandle instanceType, RuntimeTypeHandle interfaceType, int slot, out RuntimeTypeHandle genericContext)
542public static unsafe IntPtr ResolveDispatchOnType(RuntimeTypeHandle instanceType, RuntimeTypeHandle interfaceType, int slot)
547public static bool IsUnmanagedPointerType(RuntimeTypeHandle typeHandle)
552public static bool IsFunctionPointerType(RuntimeTypeHandle typeHandle)
557public static unsafe RuntimeTypeHandle GetFunctionPointerReturnType(RuntimeTypeHandle typeHandle)
562public static unsafe int GetFunctionPointerParameterCount(RuntimeTypeHandle typeHandle)
567public static unsafe RuntimeTypeHandle GetFunctionPointerParameterType(RuntimeTypeHandle typeHandle, int argumentIndex)
573public static unsafe RuntimeTypeHandle[] GetFunctionPointerParameterTypes(RuntimeTypeHandle typeHandle)
577return Array.Empty<RuntimeTypeHandle>();
579RuntimeTypeHandle[] result = new RuntimeTypeHandle[paramCount];
589public static unsafe bool IsUnmanagedFunctionPointerType(RuntimeTypeHandle typeHandle)
594public static bool IsByRefType(RuntimeTypeHandle typeHandle)
599public static bool IsGenericTypeDefinition(RuntimeTypeHandle typeHandle)
604public static object CheckArgument(object srcObject, RuntimeTypeHandle dstType, BinderBundle? binderBundle)
611public static object CheckArgumentForDirectFieldAccess(object srcObject, RuntimeTypeHandle dstType)
616public static bool IsAssignable(object srcObject, RuntimeTypeHandle dstType)
625public static bool IsNullable(RuntimeTypeHandle declaringTypeHandle)
630public static RuntimeTypeHandle GetNullableType(RuntimeTypeHandle nullableType)
Internal\Runtime\Augments\TypeLoaderCallbacks.cs (14)
17public abstract bool TryGetOwningTypeForMethodDictionary(IntPtr dictionary, out RuntimeTypeHandle owningType);
19public abstract bool TryGetConstructedGenericTypeForComponents(RuntimeTypeHandle genericTypeDefinitionHandle, RuntimeTypeHandle[] genericTypeArgumentHandles, out RuntimeTypeHandle runtimeTypeHandle);
22public abstract RuntimeMethodHandle GetRuntimeMethodHandleForComponents(RuntimeTypeHandle declaringTypeHandle, MethodHandle handle, RuntimeTypeHandle[] genericMethodArgs);
23public abstract IntPtr TryGetDefaultConstructorForType(RuntimeTypeHandle runtimeTypeHandle);
24public abstract IntPtr ResolveGenericVirtualMethodTarget(RuntimeTypeHandle targetTypeHandle, RuntimeMethodHandle declMethod);
25public abstract RuntimeFieldHandle GetRuntimeFieldHandleForComponents(RuntimeTypeHandle declaringTypeHandle, FieldHandle handle);
26public abstract bool TryGetPointerTypeForTargetType(RuntimeTypeHandle pointeeTypeHandle, out RuntimeTypeHandle pointerTypeHandle);
27public abstract bool TryGetArrayTypeForElementType(RuntimeTypeHandle elementTypeHandle, bool isMdArray, int rank, out RuntimeTypeHandle arrayTypeHandle);
31public 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)
37public OpenMethodResolver(RuntimeTypeHandle declaringTypeOfSlot, int slot, GCHandle readerGCHandle, int handle)
47public OpenMethodResolver(RuntimeTypeHandle declaringTypeOfSlot, RuntimeMethodHandle gvmSlot, GCHandle readerGCHandle, int handle)
60public OpenMethodResolver(RuntimeTypeHandle declaringType, IntPtr codePointer, GCHandle readerGCHandle, int handle, short resolveType)
83public RuntimeTypeHandle DeclaringType
170public 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);