1 instantiation of RuntimeType
System.Private.CoreLib (1)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (1)
625RuntimeType type = new RuntimeType(this);
138 references to RuntimeType
System.Private.CoreLib (138)
Internal\Reflection\Augments\ReflectionAugments.cs (5)
45internal static unsafe TypeCode GetRuntimeTypeCode(RuntimeType type) 262if (!(type is RuntimeType runtimeDelegateType)) 291if (!(type is RuntimeType runtimeDelegateType)) 318if (!(type is RuntimeType runtimeDelegateType)) 321if (!(target is RuntimeType runtimeContainingType))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (16)
79RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 94RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 111RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 128RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 156RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 211RuntimeType? t = arrayType as RuntimeType; 248RuntimeType? t = arrayType as RuntimeType; 304RuntimeType? t = arrayType as RuntimeType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
551if (!(realTypes[i] is RuntimeType || realTypes[i] is SignatureType)) 590if (type.UnderlyingSystemType is not RuntimeType rtType || 677if (indexes[j].UnderlyingSystemType is not RuntimeType rtType || 695if (returnType.UnderlyingSystemType is not RuntimeType rtType ||
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (42)
59RuntimeType rt = (RuntimeType)typeof(TEnum); 100internal static string? GetName(RuntimeType enumType, ulong uint64Value) 223RuntimeType rt = (RuntimeType)typeof(TEnum); 256internal static string[] GetNamesNoCopy(RuntimeType enumType) 292Array values = GetValuesAsUnderlyingTypeNoCopy((RuntimeType)typeof(TEnum)); 339internal static Array GetValuesAsUnderlyingType(RuntimeType enumType) 369internal static Array GetValuesAsUnderlyingTypeNoCopy(RuntimeType enumType) 474RuntimeType rt = (RuntimeType)typeof(TEnum); 492internal static bool IsDefinedPrimitive<TStorage>(RuntimeType enumType, TStorage value) 723RuntimeType rt = ValidateRuntimeType(enumType); 774static bool TryParseRareTypes(RuntimeType rt, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out long result) 891RuntimeType rt = (RuntimeType)typeof(TEnum); 915RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TUnderlying result) 973RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TUnderlying result) 1043private static bool TryParseByName<TStorage>(RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TStorage result) 1357RuntimeType enumType = (RuntimeType)GetType(); 1374static string HandleRareTypes(RuntimeType enumType, ref byte rawData) => 1405RuntimeType enumType = (RuntimeType)GetType(); 1425static string HandleRareTypes(RuntimeType enumType, char formatChar, ref byte rawData) => 1452private static string ToString<TUnderlying, TStorage>(RuntimeType enumType, ref byte rawData) 1464private static string ToStringInlined<TUnderlying, TStorage>(RuntimeType enumType, ref byte rawData) 1481private static string ToString<TUnderlying, TStorage>(RuntimeType enumType, char format, ref byte rawData) 1494private static string ToStringInlined<TUnderlying, TStorage>(RuntimeType enumType, char format, ref byte rawData) 1630RuntimeType rtType = ValidateRuntimeType(enumType); 1690RuntimeType enumType = (RuntimeType)GetType(); 1750RuntimeType rt = (RuntimeType)typeof(TEnum); 1809RuntimeType rt = (RuntimeType)typeof(TEnum); 1857private static bool TryFormatPrimitiveDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten) 1892private static bool TryFormatPrimitiveNonDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format) 2126private static RuntimeType ValidateRuntimeType(Type enumType) 2130RuntimeType? rt = enumType as RuntimeType; 2148throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (4)
15private readonly RuntimeType _ptrType; 17private Pointer(void* ptr, RuntimeType ptrType) 29if (type is not RuntimeType rtType) 60internal RuntimeType GetPointerType() => _ptrType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
224if (resourceSource is not RuntimeType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (10)
94return SizeOfHelper((RuntimeType)structure.GetType(), throwIfNotMarshalable: true); 101return SizeOfHelper((RuntimeType)structure.GetType(), throwIfNotMarshalable: true); 110if (t is not RuntimeType rt) 124RuntimeType t = (RuntimeType)typeof(T); 567if (structureType is not RuntimeType) 1155if (type is not RuntimeType) 1199if (t is not RuntimeType rt) 1223RuntimeType rt = (RuntimeType)typeof(TDelegate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TypeMapping.cs (2)
29return TypeMapLazyDictionary.CreateExternalTypeMap((RuntimeType)typeof(TTypeMapGroup)); 47return TypeMapLazyDictionary.CreateProxyTypeMap((RuntimeType)typeof(TTypeMapGroup));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (2)
339if (type is not RuntimeType) 356Debug.Assert(type is RuntimeType, "[SerializationInfo.GetValue]type is not a runtime type");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (8)
35if (this is RuntimeType rt) 497if (RuntimeHelpers.IsKnownConstant(type) && type is RuntimeType) 499return GetRuntimeTypeCode((RuntimeType)type); 505internal static TypeCode GetRuntimeTypeCode(RuntimeType type) 507RuntimeType underlyingType = type; 509underlyingType = (RuntimeType)type.GetEnumUnderlyingType(); 870if (left is null || right is null || left is RuntimeType || right is RuntimeType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
22if (underlyingType is RuntimeType) 376if (toType is RuntimeType)
System\ActivatorImplementation.cs (1)
149if (type is not RuntimeType)
System\Array.NativeAot.cs (3)
53private static unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds) 90private static unsafe Array InternalCreateFromArrayType(RuntimeType arrayType, int rank, int* pLengths, int* pLowerBounds) 251RuntimeType elementType = Type.GetTypeFromMethodTable(pEEType->RelatedParameterType);
System\Enum.NativeAot.cs (5)
25internal static unsafe EnumInfo GetEnumInfo(RuntimeType enumType, bool getNames = true) 40internal static EnumInfo<TStorage> GetEnumInfo<TStorage>(RuntimeType enumType, bool getNames = true) 68private static unsafe CorElementType InternalGetCorElementType(RuntimeType rt) 145internal static Type InternalGetUnderlyingType(RuntimeType enumType) 147Debug.Assert(enumType is RuntimeType);
System\Reflection\Runtime\General\Helpers.cs (1)
56if (type is RuntimeType runtimeType)
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (1)
73if (!(delegateType is RuntimeType runtimeDelegateType))
System\Reflection\Runtime\MethodInfos\RuntimeNamedMethodInfo.cs (1)
136if (typeArgument is not RuntimeType typeArgumentAsRuntimeType)
System\Reflection\Runtime\TypeInfos\RuntimeFunctionPointerTypeInfo.cs (1)
60return other is RuntimeType runtimeType && runtimeType.GetRuntimeTypeInfo() is IRuntimeMemberInfoWithNoMetadataDefinition;
System\Reflection\Runtime\TypeInfos\RuntimeHasElementTypeInfo.cs (1)
82return other is RuntimeType runtimeType && runtimeType.GetRuntimeTypeInfo() is IRuntimeMemberInfoWithNoMetadataDefinition;
System\Reflection\Runtime\TypeInfos\RuntimeTypeDefinitionTypeInfo.cs (1)
23if (other is RuntimeType otherRuntimeType && otherRuntimeType.IsConstructedGenericType)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (9)
194if (!(interfaceType is RuntimeType)) 302if (typeInfo is not RuntimeType) 432if (paramType is not RuntimeType rtType) 473if (typeArgument is RuntimeType typeArgumentAsRuntimeType) 615private RuntimeType _type; 618public RuntimeType ToType() => _type ?? InitializeType(); 620private RuntimeType InitializeType() 625RuntimeType type = new RuntimeType(this); 631_type = (RuntimeType)Type.GetTypeFromHandle(runtimeTypeHandle)!;
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (3)
236if (type is not RuntimeType) 257if (type is not RuntimeType) 296if (type is not RuntimeType)
System\Runtime\InteropServices\Marshal.NativeAot.cs (3)
19internal static int SizeOfHelper(RuntimeType t, bool throwIfNotMarshalable) 42if (t is not RuntimeType) 158internal static Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, RuntimeType t)
System\Runtime\InteropServices\TypeMapLazyDictionary.NativeAot.cs (2)
21public static IReadOnlyDictionary<string, Type> CreateExternalTypeMap(RuntimeType typeMapGroup) 64public static IReadOnlyDictionary<Type, Type> CreateProxyTypeMap(RuntimeType typeMapGroup)
System\RuntimeType.NativeAot.cs (1)
618if (c.UnderlyingSystemType is not RuntimeType fromRuntimeType)
System\Type.NativeAot.cs (9)
26internal static unsafe RuntimeType? GetTypeFromMethodTableMaybeNull(MethodTable* pMT) => (pMT == null) ? null : GetTypeFromMethodTable(pMT); 30internal static unsafe RuntimeType GetTypeFromMethodTable(MethodTable* pMT) 32ref RuntimeType? type = ref Unsafe.AsRef<RuntimeType?>(pMT->WritableData); 43private static unsafe RuntimeType GetTypeFromMethodTableSlow(MethodTable* pMT) 48ref RuntimeType? runtimeTypeCache = ref Unsafe.AsRef<RuntimeType?>(pMT->WritableData); 52RuntimeType? type = FrozenObjectHeapManager.Instance.TryAllocateObject<RuntimeType>();