689 references to RuntimeType
System.Private.CoreLib (689)
src\libraries\System.Private.CoreLib\src\System\Activator.RuntimeType.cs (3)
36if (type.UnderlyingSystemType is not RuntimeType rt) 97if (type.UnderlyingSystemType is not RuntimeType rt) 140return (T)((RuntimeType)typeof(T)).CreateInstanceOfT()!;
src\libraries\System.Private.CoreLib\src\System\Array.cs (16)
80RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 95RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 112RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 129RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 157RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; 212RuntimeType? t = arrayType as RuntimeType; 249RuntimeType? t = arrayType as RuntimeType; 305RuntimeType? t = arrayType as RuntimeType;
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
549if (!(realTypes[i] is RuntimeType || realTypes[i] is SignatureType)) 588if (type.UnderlyingSystemType is not RuntimeType rtType || 675if (indexes[j].UnderlyingSystemType is not RuntimeType rtType || 693if (returnType.UnderlyingSystemType is not RuntimeType rtType ||
src\libraries\System.Private.CoreLib\src\System\Enum.cs (42)
61RuntimeType rt = (RuntimeType)typeof(TEnum); 102internal static string? GetName(RuntimeType enumType, ulong uint64Value) 225RuntimeType rt = (RuntimeType)typeof(TEnum); 258internal static string[] GetNamesNoCopy(RuntimeType enumType) 294Array values = GetValuesAsUnderlyingTypeNoCopy((RuntimeType)typeof(TEnum)); 341internal static Array GetValuesAsUnderlyingType(RuntimeType enumType) 371internal static Array GetValuesAsUnderlyingTypeNoCopy(RuntimeType enumType) 476RuntimeType rt = (RuntimeType)typeof(TEnum); 494internal static bool IsDefinedPrimitive<TStorage>(RuntimeType enumType, TStorage value) 725RuntimeType rt = ValidateRuntimeType(enumType); 776static bool TryParseRareTypes(RuntimeType rt, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out long result) 893RuntimeType rt = (RuntimeType)typeof(TEnum); 917RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TUnderlying result) 975RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TUnderlying result) 1045private static bool TryParseByName<TStorage>(RuntimeType enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, out TStorage result) 1358RuntimeType enumType = (RuntimeType)GetType(); 1375static string HandleRareTypes(RuntimeType enumType, ref byte rawData) => 1406RuntimeType enumType = (RuntimeType)GetType(); 1426static string HandleRareTypes(RuntimeType enumType, char formatChar, ref byte rawData) => 1453private static string ToString<TUnderlying, TStorage>(RuntimeType enumType, ref byte rawData) 1465private static string ToStringInlined<TUnderlying, TStorage>(RuntimeType enumType, ref byte rawData) 1482private static string ToString<TUnderlying, TStorage>(RuntimeType enumType, char format, ref byte rawData) 1495private static string ToStringInlined<TUnderlying, TStorage>(RuntimeType enumType, char format, ref byte rawData) 1631RuntimeType rtType = ValidateRuntimeType(enumType); 1691RuntimeType enumType = (RuntimeType)GetType(); 1751RuntimeType rt = (RuntimeType)typeof(TEnum); 1810RuntimeType rt = (RuntimeType)typeof(TEnum); 1858private static bool TryFormatPrimitiveDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten) 1893private static bool TryFormatPrimitiveNonDefault<TUnderlying, TStorage>(RuntimeType enumType, TUnderlying value, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format) 2127private static RuntimeType ValidateRuntimeType(Type enumType) 2131RuntimeType? rt = enumType as RuntimeType; 2149throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType));
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (4)
32private readonly RuntimeType[] _argTypes; 61private ConstructorInvoker(RuntimeConstructorInfo constructor, RuntimeType[] argumentTypes) 404Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 418RuntimeType sigType = _argTypes[i];
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (8)
233_parameterTypes = new RuntimeType[signature.Length]; 238_parameterTypes[i] = (signature[i].UnderlyingSystemType as RuntimeType)!; 245_parameterTypes = Array.Empty<RuntimeType>(); 250(RuntimeType)typeof(void) : 251(returnType.UnderlyingSystemType as RuntimeType) ?? throw new NotSupportedException(SR.Arg_InvalidTypeInRetType); 269if (owner?.UnderlyingSystemType is RuntimeType rtOwner) 350if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 411internal RuntimeType[] ArgumentTypes => _parameterTypes;
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (10)
43RuntimeType fieldType = (RuntimeType)_fieldInfo.FieldType; 173object? ret = RuntimeFieldHandle.GetValue(_fieldInfo, obj, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 188return RuntimeFieldHandle.GetValue(_fieldInfo, obj, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 194if (_fieldInfo.DeclaringType is not null && ((RuntimeType)_fieldInfo.FieldType).IsNullableOfT) 298RuntimeFieldHandle.SetValue(_fieldInfo, obj, value, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 325RuntimeFieldHandle.SetValue(_fieldInfo, obj, value, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 365if (((RuntimeType)_fieldInfo.FieldType).IsActualValueType) 367((RuntimeType)_fieldInfo.FieldType).CheckValue(ref value, binder, culture, invokeAttr); 372((RuntimeType)_fieldInfo.FieldType).CheckValue(ref value, binder, culture, invokeAttr);
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (11)
52RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; 120RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; 186RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; 247RuntimeType returnType; 250returnType = (RuntimeType)rmi.ReturnType; 255returnType = (RuntimeType)((DynamicMethod)method).ReturnType; 279RuntimeType elementType = (RuntimeType)returnType.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (2)
14public static object ConvertOrWiden(RuntimeType srcType, object srcObject, RuntimeType dstType, CorElementType dstElementType)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
142internal static object? HandleTypeMissing(ParameterInfo paramInfo, RuntimeType sigType)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (8)
25private readonly RuntimeType[] _argTypes; 30private MethodBaseInvoker(MethodBase method, RuntimeType[] argumentTypes) 339Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 363RuntimeType sigType = _argTypes[i]; 398private static bool TryByRefFastPath(RuntimeType type, ref object arg) 400if (RuntimeType.TryGetByRefElementType(type, out RuntimeType? sigElementType) && 407arg = RuntimeType.AllocateValueType(sigElementType, arg);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (4)
33private readonly RuntimeType[] _argTypes; 80private MethodInvoker(MethodBase method, RuntimeType[] argumentTypes) 457Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 471RuntimeType sigType = _argTypes[i];
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (3)
14RuntimeType[] argumentTypes, 41RuntimeType type = argumentTypes[i]; 44type = (RuntimeType)type.GetElementType();
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) 59internal RuntimeType GetPointerType() => _ptrType;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
224if (resourceSource is not RuntimeType)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\QCallHandles.cs (1)
86internal QCallTypeHandle(ref RuntimeType type)
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); 573if (structureType is not RuntimeType) 1055if (type is not RuntimeType) 1098if (t is not RuntimeType rt) 1122RuntimeType rt = (RuntimeType)typeof(TDelegate);
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\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (22)
62if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 102RuntimeType valueType = (RuntimeType)value.GetType(); 195if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 209RuntimeType valueType = (RuntimeType)value.GetType(); 216valueType = (RuntimeType)valueType.GetEnumUnderlyingType(); 227RuntimeType underlyingType = Enum.InternalGetUnderlyingType(this); 273if (c.UnderlyingSystemType is RuntimeType fromType) 675private RuntimeType? GetBaseType() 684RuntimeType baseType = ObjectType; 688RuntimeType constraint = (RuntimeType)constraints[i]; 718private static void ThrowIfTypeNeverValidGenericArgument(RuntimeType type) 725internal static void SanityCheckGenericArguments(RuntimeType[] genericArguments, RuntimeType[] genericParameters) 740internal static CorElementType GetUnderlyingType(RuntimeType type) 744type = (RuntimeType)Enum.GetUnderlyingType(type); 753internal static bool TryGetByRefElementType(RuntimeType type, [NotNullWhen(true)] out RuntimeType? elementType) 887internal static object? AllocateValueType(RuntimeType type, object? value) 911RuntimeType? sigElementType;
src\libraries\System.Private.CoreLib\src\System\Type.cs (8)
35if (this is RuntimeType rt) 488if (RuntimeHelpers.IsKnownConstant(type) && type is RuntimeType) 490return GetRuntimeTypeCode((RuntimeType)type); 496internal static TypeCode GetRuntimeTypeCode(RuntimeType type) 498RuntimeType underlyingType = type; 500underlyingType = (RuntimeType)type.GetEnumUnderlyingType(); 693if (left is null || right is null || left is RuntimeType || right is RuntimeType)
src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (3)
22if (underlyingType is RuntimeType) 81if (this is RuntimeType rt) 348if (toType is RuntimeType)
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (5)
27RuntimeType targetType = (RuntimeType)target.GetType(); 40RuntimeType fieldType = (RuntimeType)field.FieldType; 65private static extern unsafe void InternalMakeTypedReference(void* result, object target, IntPtr[] flds, RuntimeType lastFieldType);
src\System\Array.CoreCLR.cs (5)
22private static unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds) 30private static unsafe Array InternalCreateFromArrayType(RuntimeType arrayType, int rank, int* pLengths, int* pLowerBounds) 643RuntimeType arrayType = (RuntimeType)GetType(); 669public ArrayInitializeCache(RuntimeType arrayType)
src\System\Collections\Generic\ArraySortHelper.CoreCLR.cs (5)
28defaultArraySortHelper = (IArraySortHelper<T>)RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(GenericArraySortHelper<string>), (RuntimeType)typeof(T)); 61defaultArraySortHelper = (IArraySortHelper<TKey, TValue>)RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(GenericArraySortHelper<string, string>), (RuntimeType)typeof(TKey), (RuntimeType)typeof(TValue));
src\System\Collections\Generic\ComparerHelpers.cs (18)
30Debug.Assert(type != null && type is RuntimeType); 33var runtimeType = (RuntimeType)type; 38result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(GenericComparer<int>), runtimeType); 43var embeddedType = (RuntimeType)type.GetGenericArguments()[0]; 44result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(NullableComparer<int>), embeddedType); 49result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(EnumComparer<>), runtimeType); 52return result ?? CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(ObjectComparer<object>), runtimeType); 64Debug.Assert(type != null && type is RuntimeType); 67var runtimeType = (RuntimeType)type; 76result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(GenericEqualityComparer<string>), runtimeType); 81var embeddedType = (RuntimeType)type.GetGenericArguments()[0]; 82result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(NullableEqualityComparer<int>), embeddedType); 87result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(EnumEqualityComparer<>), runtimeType); 90return result ?? CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(ObjectEqualityComparer<object>), runtimeType);
src\System\Delegate.CoreCLR.cs (19)
48if (!BindToMethodName(target, (RuntimeType)target.GetType(), method, 64if (!(target is RuntimeType rtTarget)) 83RuntimeMethodInfo invoke = (RuntimeMethodInfo)RuntimeType.GetMethodBase((RuntimeType)this.GetType(), method)!; 162RuntimeType? declaringType = RuntimeMethodHandle.GetDeclaringType(method); 188declaringType = currentType as RuntimeType; 203declaringType = (RuntimeType)invoke.GetParametersAsSpan()[0].ParameterType; 207_methodBase = (MethodInfo)RuntimeType.GetMethodBase(declaringType, method)!; 222if (!(type is RuntimeType rtType)) 235if (!d.BindToMethodName(target, (RuntimeType)target.GetType(), method, 259if (!(type is RuntimeType rtType)) 261if (!(target is RuntimeType rtTarget)) 292if (!(type is RuntimeType rtType)) 327if (!(type is RuntimeType rtType)) 365if (!(type is RuntimeType rtType)) 386internal static Delegate? CreateDelegateInternal(RuntimeType rtType, RuntimeMethodInfo rtMethod, object? firstArgument, DelegateBindingFlags flags) 404private bool BindToMethodName(object? target, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] RuntimeType methodType, string method, DelegateBindingFlags flags) 415private bool BindToMethodInfo(object? target, IRuntimeMethodInfo method, RuntimeType methodType, DelegateBindingFlags flags) 428private static MulticastDelegate InternalAlloc(RuntimeType type)
src\System\Diagnostics\StackFrame.CoreCLR.cs (1)
76return RuntimeType.GetMethodBase(null, method);
src\System\Diagnostics\StackFrameHelper.cs (1)
171return RuntimeType.GetMethodBase(mhReal);
src\System\Enum.CoreCLR.cs (21)
21private static unsafe CorElementType InternalGetCorElementType(RuntimeType rt) 38private static readonly RuntimeType?[] s_underlyingTypes = 42(RuntimeType)typeof(bool), 43(RuntimeType)typeof(char), 44(RuntimeType)typeof(sbyte), 45(RuntimeType)typeof(byte), 46(RuntimeType)typeof(short), 47(RuntimeType)typeof(ushort), 48(RuntimeType)typeof(int), 49(RuntimeType)typeof(uint), 50(RuntimeType)typeof(long), 51(RuntimeType)typeof(ulong), 52(RuntimeType)typeof(float), 53(RuntimeType)typeof(double), 64(RuntimeType)typeof(nint), 65(RuntimeType)typeof(nuint) 69internal static unsafe RuntimeType InternalGetUnderlyingType(RuntimeType enumType) 74RuntimeType? underlyingType = s_underlyingTypes[(int)InternalGetCorElementType((MethodTable*)enumType.GetUnderlyingNativeHandle())]; 82private static EnumInfo<TStorage> GetEnumInfo<TStorage>(RuntimeType enumType, bool getNames = true) 95static EnumInfo<TStorage> InitializeEnumInfo(RuntimeType enumType, bool getNames)
src\System\Exception.CoreCLR.cs (1)
70return RuntimeType.GetMethodBase(method);
src\System\MulticastDelegate.CoreCLR.cs (4)
521RuntimeType declaringType = RuntimeMethodHandle.GetDeclaringType(method); 527RuntimeType reflectedType = (RuntimeType)GetType(); 530_methodBase = (MethodInfo)RuntimeType.GetMethodBase(declaringType, method)!;
src\System\Reflection\Associates.cs (8)
42RuntimeType declaredType, 43RuntimeType reflectedType) 54RuntimeType[] genericArguments = declaredType.TypeHandle.GetInstantiationInternal(); 104RuntimeType.GetMethodBase(reflectedType, associateMethodHandle) as RuntimeMethodInfo; 113RuntimeType declaringType, 114RuntimeType reflectedType, 133reflectedType = (RuntimeType)reflectedType.BaseType!; 199bindingFlags = RuntimeType.FilterPreCalculate(isPseudoPublic, isInherited, isPseudoStatic);
src\System\Reflection\Emit\DynamicILGenerator.cs (16)
41RuntimeType? rtType = localType as RuntimeType; 71RuntimeType declaringType = rtMeth.GetRuntimeType(); 119RuntimeType declaringType = rtConstructor.GetRuntimeType(); 140RuntimeType? rtType = type as RuntimeType; 349RuntimeType? rtType = exceptionType as RuntimeType; 504private int GetTokenFor(RuntimeType rtType) 514private int GetTokenFor(RuntimeFieldInfo runtimeField, RuntimeType rtType) 524private int GetTokenFor(RuntimeConstructorInfo rtMeth, RuntimeType rtType) 534private int GetTokenFor(RuntimeMethodInfo rtMeth, RuntimeType rtType) 682internal override RuntimeType? GetJitContext(out int securityControlFlags) 684RuntimeType? typeOwner; 1029RuntimeType type = RuntimeMethodHandle.GetDeclaringType(rmhi); 1033MethodBase m = RuntimeType.GetMethodBase(methodReal)!;
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (3)
18private RuntimeType[] _parameterTypes; 20private RuntimeType _returnType; 26internal RuntimeType? _typeOwner;
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (9)
234Debug.Assert(destType is RuntimeType, "destType is not a runtime type, an EnumBuilder, or a TypeBuilder."); 252CorElementType corType = RuntimeTypeHandle.GetCorElementType((RuntimeType)type); 330private RuntimeType m_bakedRuntimeType = null!; 568internal RuntimeType BakedRuntimeType => m_bakedRuntimeType; 853if (fromRuntimeType != null && fromRuntimeType is RuntimeType) 986return CustomAttribute.GetCustomAttributes(m_bakedRuntimeType, (typeof(object) as RuntimeType)!, inherit); 996if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 1009if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 1657RuntimeType? cls = null;
src\System\Reflection\Emit\SignatureHelper.cs (4)
431if (clsArgument is RuntimeType) 433type = RuntimeTypeHandle.GetCorElementType((RuntimeType)clsArgument); 744if (t is not RuntimeType rtType) 767if (t is not RuntimeType rtType)
src\System\Reflection\FieldInfo.CoreCLR.cs (2)
13FieldInfo f = RuntimeType.GetFieldInfo(handle.GetRuntimeFieldInfo()); 29return RuntimeType.GetFieldInfo(declaringType.GetRuntimeType(), handle.GetRuntimeFieldInfo());
src\System\Reflection\MdConstant.cs (1)
12RuntimeType fieldType = fieldTypeHandle.GetRuntimeType();
src\System\Reflection\MdFieldInfo.cs (2)
7using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 16private RuntimeType? m_fieldType;
src\System\Reflection\MdImport.cs (2)
272RuntimeType? safeArrayUserDefinedType = string.IsNullOrEmpty(safeArrayUserDefinedTypeName) ? null : 274RuntimeType? marshalTypeRef = null;
src\System\Reflection\Metadata\RuntimeTypeMetadataUpdateHandler.cs (1)
59private static void ClearCache(Type type) => (type as RuntimeType)?.ClearCache();
src\System\Reflection\MethodBase.CoreCLR.cs (3)
20MethodBase? m = RuntimeType.GetMethodBase(handle.GetMethodInfo()); 36return RuntimeType.GetMethodBase(declaringType.GetRuntimeType(), handle.GetMethodInfo()); 48return methodHandle.IsNullHandle() ? null : RuntimeType.GetMethodBase(null, methodHandle);
src\System\Reflection\RtFieldInfo.cs (8)
8using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 20private RuntimeType? m_fieldType; 37RuntimeFieldHandleInternal handle, RuntimeType declaringType, RuntimeTypeCache reflectedTypeCache, BindingFlags bindingFlags) 97return RuntimeFieldHandle.GetValueDirect(this, (RuntimeType)FieldType, &obj, (RuntimeType?)DeclaringType); 115RuntimeFieldHandle.SetValueDirect(this, (RuntimeType)FieldType, &obj, value, (RuntimeType?)DeclaringType); 135private RuntimeType InitializeFieldType()
src\System\Reflection\RuntimeAssembly.cs (4)
191return (MethodInfo?)RuntimeType.GetMethodBase(methodHandle); 336return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 343if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 353if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (9)
11using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 18private readonly RuntimeType m_declaringType; 57RuntimeMethodHandleInternal handle, RuntimeType declaringType, RuntimeTypeCache reflectedTypeCache, 92private RuntimeType ReflectedTypeInternal => m_reflectedTypeCache.GetRuntimeType(); 131return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 138if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 148if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 173internal RuntimeType GetRuntimeType() { return m_declaringType; } 200internal RuntimeType[] ArgumentTypes => Signature.Arguments;
src\System\Reflection\RuntimeCustomAttributeData.cs (18)
18internal static IList<CustomAttributeData> GetCustomAttributesInternal(RuntimeType target) 23RuntimeType.ListBuilder<Attribute> pcas = default; 24PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas); 33RuntimeType.ListBuilder<Attribute> pcas = default; 34PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas); 43RuntimeType.ListBuilder<Attribute> pcas = default; 44PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas); 92RuntimeType.ListBuilder<Attribute> pcas = default; 94PseudoCustomAttribute.GetCustomAttributes(target, (RuntimeType)typeof(object), ref pcas); 98private static ReadOnlyCollection<CustomAttributeData> GetCombinedList(IList<CustomAttributeData> customAttributes, ref RuntimeType.ListBuilder<Attribute> pseudoAttributes) 113internal static CustomAttributeEncoding TypeToCustomAttributeEncoding(RuntimeType type) 254m_ctor = (RuntimeConstructorInfo)RuntimeType.GetMethodBase(m_scope, caCtorToken)!; 268m_ctorParams[i] = new CustomAttributeCtorParameter(new CustomAttributeType((RuntimeType)parameters[i].ParameterType)); 287new CustomAttributeType((RuntimeType)fi.FieldType)); 295new CustomAttributeType((RuntimeType)pi.PropertyType)); 544private static RuntimeType ResolveType(RuntimeModule scope, string typeName) 546RuntimeType type = TypeNameResolver.GetTypeReferencedByCustomAttribute(typeName, scope); 908enumTag = RuntimeCustomAttributeData.TypeToCustomAttributeEncoding((RuntimeType)enumType.GetEnumUnderlyingType());
src\System\Reflection\RuntimeEventInfo.cs (8)
7using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 23private readonly RuntimeType m_declaringType; 28internal RuntimeEventInfo(int tkEvent, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate) 41RuntimeType reflectedType = reflectedTypeCache.GetRuntimeType(); 91return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 98if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 108if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 127private RuntimeType ReflectedTypeInternal => m_reflectedTypeCache.GetRuntimeType();
src\System\Reflection\RuntimeFieldInfo.cs (9)
5using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 14protected internal readonly RuntimeType m_declaringType; 18protected RuntimeFieldInfo(RuntimeTypeCache reflectedTypeCache, RuntimeType declaringType, BindingFlags bindingFlags) 28private RuntimeType ReflectedTypeInternal => m_reflectedTypeCache.GetRuntimeType(); 30internal RuntimeType GetDeclaringTypeInternal() 35internal RuntimeType GetRuntimeType() { return m_declaringType; } 62return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 69if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 79if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
src\System\Reflection\RuntimeLocalVariableInfo.cs (1)
10private RuntimeType? _type;
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (30)
12using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 28private readonly RuntimeType m_declaringType; 56RuntimeMethodHandleInternal handle, RuntimeType declaringType, 74private RuntimeType ReflectedTypeInternal => m_reflectedTypeCache.GetRuntimeType(); 111RuntimeType? parent = (RuntimeType?)m_declaringType.BaseType; 121return (RuntimeMethodInfo?)RuntimeType.GetMethodBase(parent, RuntimeTypeHandle.GetMethodAt(parent, slot)); 125internal RuntimeType GetDeclaringTypeInternal() 174return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!, inherit); 181if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 191if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 233internal RuntimeType GetRuntimeType() { return m_declaringType; } 271internal RuntimeType[] ArgumentTypes => Signature.Arguments; 330RuntimeType declaringType = (RuntimeType)DeclaringType!; 331RuntimeType? baseDeclaringType = declaringType; 344declaringType = (RuntimeType)declaringType.BaseType!; 347return (MethodInfo)RuntimeType.GetMethodBase(baseDeclaringType, baseMethodHandle)!; 383RuntimeType? rtType = delegateType as RuntimeType; 407RuntimeType[] methodInstantionRuntimeType = new RuntimeType[methodInstantiation.Length]; 418RuntimeType? rtMethodInstantiationElem = methodInstantiationElem as RuntimeType; 432RuntimeType[] genericParameters = GetGenericArgumentsInternal(); 434RuntimeType.SanityCheckGenericArguments(methodInstantionRuntimeType, genericParameters); 440ret = RuntimeType.GetMethodBase(ReflectedTypeInternal, 445RuntimeType.ValidateGenericArguments(this, methodInstantionRuntimeType, e); 452internal RuntimeType[] GetGenericArgumentsInternal() => 463return (RuntimeType.GetMethodBase(m_declaringType, RuntimeMethodHandle.StripMethodInstantiation(this)) as MethodInfo)!;
src\System\Reflection\RuntimeModule.cs (13)
18private RuntimeType m_runtimeType; 42if (!(typeArg is RuntimeType)) 124return RuntimeType.GetMethodBase(declaringType as RuntimeType, methodHandle); 201RuntimeType declaringType = RuntimeFieldHandle.GetApproxDeclaringType(fieldHandle.Value); 206declaringType = (RuntimeType)ResolveType(tkDeclaringType, genericTypeArguments, genericMethodArguments); 209return RuntimeType.GetFieldInfo(declaringType, fieldHandle); 354internal RuntimeType RuntimeType => m_runtimeType ??= ModuleHandle.GetModuleType(this); 362return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 369if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 379if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 428internal RuntimeType[] GetDefinedTypes() 430RuntimeType[]? types = null;
src\System\Reflection\RuntimeParameterInfo.cs (4)
223RuntimeType parameterType; 460return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 467if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 483if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType)
src\System\Reflection\RuntimePropertyInfo.cs (8)
9using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache; 24private readonly RuntimeType m_declaringType; 32int tkProperty, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate) 124RuntimeType[] arguments = Signature.Arguments; 139return CustomAttribute.GetCustomAttributes(this, (typeof(object) as RuntimeType)!); 146if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 156if (attributeType.UnderlyingSystemType is not RuntimeType attributeRuntimeType) 177private RuntimeType ReflectedTypeInternal => m_reflectedTypeCache.GetRuntimeType();
src\System\Reflection\TypeNameResolver.CoreCLR.cs (6)
108internal static RuntimeType GetTypeReferencedByCustomAttribute(string typeName, RuntimeModule scope) 115RuntimeType? type = (RuntimeType?)new TypeNameResolver() 130internal static unsafe RuntimeType? GetTypeHelper(char* pTypeName, RuntimeAssembly? requestingAssembly, 150RuntimeType? type = (RuntimeType?)new TypeNameResolver()
src\System\Runtime\CompilerServices\ICastableHelpers.cs (3)
15internal static bool IsInstanceOfInterface(ICastable castable, RuntimeType type, [NotNullWhen(true)] out Exception? castError) 20internal static RuntimeType GetImplType(ICastable castable, RuntimeType interfaceType)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (3)
72RuntimeType rt = type.GetRuntimeType(); 212if (type is not RuntimeType rt) 361if (type is not RuntimeType rt)
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (4)
16internal static bool IsInterfaceImplemented(IDynamicInterfaceCastable castable, RuntimeType interfaceType, bool throwIfNotImplemented) 26internal static RuntimeType? GetInterfaceImplementation(IDynamicInterfaceCastable castable, RuntimeType interfaceType) 32RuntimeType implType = handle.GetRuntimeType();
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (3)
27internal static int SizeOfHelper(RuntimeType t, [MarshalAs(UnmanagedType.Bool)] bool throwIfNotMarshalable) 309if (structuretype is not RuntimeType rt) 973internal static Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, RuntimeType t)
src\System\RuntimeHandles.cs (121)
24RuntimeType type = m_type; 31internal RuntimeType GetTypeChecked() 34RuntimeType type = m_type; 41internal static extern bool IsInstanceOfType(RuntimeType type, [NotNullWhen(true)] object? o); 67internal RuntimeType m_type; 80internal RuntimeTypeHandle(RuntimeType type) 95internal static bool IsTypeDefinition(RuntimeType type) 113internal static bool IsPrimitive(RuntimeType type) 118internal static bool IsByRef(RuntimeType type) 124internal static bool IsPointer(RuntimeType type) 130internal static bool IsArray(RuntimeType type) 136internal static bool IsSZArray(RuntimeType type) 142internal static bool IsFunctionPointer(RuntimeType type) 148internal static bool HasElementType(RuntimeType type) 207[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] RuntimeType type, 208RuntimeType genericParameter) 230[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] RuntimeType type, 231RuntimeType genericParameter1, 232RuntimeType genericParameter2) 270RuntimeType rt, 309internal RuntimeType GetRuntimeType() 315internal static extern CorElementType GetCorElementType(RuntimeType type); 318internal static extern RuntimeAssembly GetAssembly(RuntimeType type); 321internal static extern RuntimeModule GetModule(RuntimeType type); 329internal static extern RuntimeType GetBaseType(RuntimeType type); 332internal static extern TypeAttributes GetAttributes(RuntimeType type); 335internal static extern RuntimeType GetElementType(RuntimeType type); 338internal static extern bool CompareCanonicalHandles(RuntimeType left, RuntimeType right); 341internal static extern int GetArrayRank(RuntimeType type); 344internal static extern int GetToken(RuntimeType type); 347internal static extern RuntimeMethodHandleInternal GetMethodAt(RuntimeType type, int slot); 350internal static extern Type[] GetArgumentTypesFromFunctionPointer(RuntimeType type); 353internal static extern bool IsUnmanagedFunctionPointer(RuntimeType type); 361internal IntroducedMethodEnumerator(RuntimeType type) 389internal static IntroducedMethodEnumerator GetIntroducedMethods(RuntimeType type) 395private static extern RuntimeMethodHandleInternal GetFirstIntroducedMethod(RuntimeType type); 401internal static extern bool GetFields(RuntimeType type, IntPtr* result, int* count); 404internal static extern Type[]? GetInterfaces(RuntimeType type); 438internal static extern int GetNumVirtuals(RuntimeType type); 441internal static extern int GetNumVirtualsAndStaticVirtuals(RuntimeType type); 463internal static bool IsComObject(RuntimeType type, bool isGenericCOM) 480internal static bool IsVisible(RuntimeType type) 497private static extern void* _GetUtf8Name(RuntimeType type); 499internal static MdUtf8String GetUtf8Name(RuntimeType type) 505internal static extern bool CanCastTo(RuntimeType type, RuntimeType target); 508internal static extern RuntimeType GetDeclaringType(RuntimeType type); 511internal static extern IRuntimeMethodInfo GetDeclaringMethod(RuntimeType type); 516internal RuntimeType[] GetInstantiationInternal() 518RuntimeType[]? types = null; 535internal RuntimeType Instantiate(RuntimeType inst) 539RuntimeType? type = null; 546internal RuntimeType Instantiate(Type[]? inst) 552RuntimeType? type = null; 563internal RuntimeType MakeArray(int rank) 565RuntimeType? type = null; 574internal RuntimeType MakeSZArray() 576RuntimeType? type = null; 585internal RuntimeType MakeByRef() 587RuntimeType? type = null; 596internal RuntimeType MakePointer() 598RuntimeType? type = null; 611internal static extern bool IsGenericVariable(RuntimeType type); 614private static extern int GetGenericVariableIndex(RuntimeType type); 618RuntimeType type = GetTypeChecked(); 627internal static extern bool ContainsGenericVariables(RuntimeType handle); 635private static extern bool SatisfiesConstraints(RuntimeType paramType, IntPtr* pTypeContext, int typeContextLength, IntPtr* pMethodContext, int methodContextLength, RuntimeType toType); 637internal static bool SatisfiesConstraints(RuntimeType paramType, RuntimeType[]? typeContext, RuntimeType[]? methodContext, RuntimeType toType) 656internal static void RegisterCollectibleTypeDependency(RuntimeType type, RuntimeAssembly? assembly) 670internal static extern bool IsEquivalentTo(RuntimeType rtType1, RuntimeType rtType2); 870internal static extern RuntimeType GetDeclaringType(RuntimeMethodHandleInternal method); 872internal static RuntimeType GetDeclaringType(IRuntimeMethodInfo method) 874RuntimeType type = GetDeclaringType(method.Value); 921internal static extern object ReboxToNullable(object? src, RuntimeType destNullableType); 926internal static RuntimeType[] GetMethodInstantiationInternal(IRuntimeMethodInfo method) 928RuntimeType[]? types = null; 934internal static RuntimeType[] GetMethodInstantiationInternal(RuntimeMethodHandleInternal method) 936RuntimeType[]? types = null; 943RuntimeType[]? types = null; 960internal static extern RuntimeMethodHandleInternal GetStubIfNeeded(RuntimeMethodHandleInternal method, RuntimeType declaringType, RuntimeType[]? methodInstantiation); 963internal static extern RuntimeMethodHandleInternal GetMethodFromCanonical(RuntimeMethodHandleInternal method, RuntimeType declaringType); 1020internal static extern RuntimeMethodBody? GetMethodBody(IRuntimeMethodInfo method, RuntimeType declaringType); 1174internal static extern RuntimeType GetApproxDeclaringType(RuntimeFieldHandleInternal field); 1176internal static RuntimeType GetApproxDeclaringType(IRuntimeFieldInfo field) 1178RuntimeType type = GetApproxDeclaringType(field.Value); 1196internal static extern object? GetValue(RtFieldInfo field, object? instance, RuntimeType fieldType, RuntimeType? declaringType, ref bool isClassInitialized); 1199internal static extern object? GetValueDirect(RtFieldInfo field, RuntimeType fieldType, void* pTypedRef, RuntimeType? contextType); 1202internal static extern void SetValue(RtFieldInfo field, object? obj, object? value, RuntimeType fieldType, RuntimeType? declaringType, ref bool isClassInitialized); 1205internal static extern void SetValueDirect(RtFieldInfo field, RuntimeType fieldType, void* pTypedRef, object? value, RuntimeType? contextType); 1208internal static extern RuntimeFieldHandleInternal GetStaticFieldForGenericType(RuntimeFieldHandleInternal field, RuntimeType declaringType); 1322RuntimeType? type = null; 1456internal static RuntimeType GetModuleType(RuntimeModule module) 1458RuntimeType? type = null; 1490RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo? methodHandle, RuntimeType? declaringType); 1497internal RuntimeType[] m_arguments; 1498internal RuntimeType? m_declaringType; 1499internal RuntimeType m_returnTypeORfieldType; 1511RuntimeType[] arguments, 1512RuntimeType returnType, 1523public Signature(IRuntimeMethodInfo methodHandle, RuntimeType declaringType) 1528public Signature(IRuntimeFieldInfo fieldHandle, RuntimeType declaringType) 1534public Signature(void* pCorSig, int cCorSig, RuntimeType declaringType) 1542internal RuntimeType[] Arguments => m_arguments; 1543internal RuntimeType ReturnType => m_returnTypeORfieldType; 1544internal RuntimeType FieldType => m_returnTypeORfieldType; 1579internal abstract RuntimeType? GetJitContext(out int securityControlFlags);
src\System\RuntimeType.ActivatorCache.cs (5)
30private readonly RuntimeType _originalRuntimeType; 33internal ActivatorCache(RuntimeType rt) 107internal object? CreateUninitializedObject(RuntimeType rt) 126internal CreateUninitializedCache GetCreateUninitializedCache(RuntimeType rt) 135private void CheckOriginalRuntimeType(RuntimeType rt)
src\System\RuntimeType.CoreCLR.cs (128)
214internal MethodBase AddMethod(RuntimeType declaringType, RuntimeMethodHandleInternal method, CacheType cacheType) 315RuntimeType approxDeclaringType = RuntimeFieldHandle.GetApproxDeclaringType(field); 599RuntimeType declaringType = ReflectedType; 763RuntimeType declaringType = ReflectedType; 811RuntimeType declaringType = ReflectedType; 835PopulateLiteralFields(filter, (RuntimeType)interfaces[i], ref list); 836PopulateRtFields(filter, (RuntimeType)interfaces[i], ref list); 848PopulateLiteralFields(filter, (RuntimeType)interfaces[i], ref list); 849PopulateRtFields(filter, (RuntimeType)interfaces[i], ref list); 858private unsafe void PopulateRtFields(Filter filter, RuntimeType declaringType, ref ListBuilder<RuntimeFieldInfo> list) 878IntPtr* ppFieldHandles, int count, RuntimeType declaringType, ref ListBuilder<RuntimeFieldInfo> list) 924private void PopulateLiteralFields(Filter filter, RuntimeType declaringType, ref ListBuilder<RuntimeFieldInfo> list) 984ref ListBuilder<RuntimeType> list, 986[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] RuntimeType iList, 999RuntimeType iFace = (RuntimeType)iFaces[j]; 1011private RuntimeType[] PopulateInterfaces(Filter filter) 1013ListBuilder<RuntimeType> list = default; 1015RuntimeType declaringType = ReflectedType; 1025RuntimeType interfaceType = (RuntimeType)ifaces[i]; 1040RuntimeType arrayType = (RuntimeType)ReflectedType.GetElementType(); 1044AddSpecialInterface(ref list, filter, (RuntimeType)typeof(IList<>).MakeGenericType(arrayType), true); 1048AddSpecialInterface(ref list, filter, (RuntimeType)typeof(IReadOnlyList<>).MakeGenericType(arrayType), false); 1049AddSpecialInterface(ref list, filter, (RuntimeType)typeof(IReadOnlyCollection<>).MakeGenericType(arrayType), false); 1055var al = new HashSet<RuntimeType>(); 1063RuntimeType constraint = (RuntimeType)constraints[i]; 1069al.Add((RuntimeType)temp[j]); 1073foreach (RuntimeType rt in al) 1089private RuntimeType[] PopulateNestedClasses(Filter filter) 1091RuntimeType declaringType = ReflectedType; 1102return Array.Empty<RuntimeType>(); 1104ListBuilder<RuntimeType> list = default; 1113RuntimeType nestedType; 1146RuntimeType declaringType = ReflectedType; 1171Filter filter, RuntimeType declaringType, Dictionary<string, RuntimeEventInfo>? csEventInfos, ref ListBuilder<RuntimeEventInfo> list) 1236RuntimeType declaringType = ReflectedType; 1281RuntimeType declaringType, 1432internal RuntimeType ReflectedType => m_runtimeTypeCache.GetRuntimeType(); 1439private readonly RuntimeType m_runtimeType; 1440private RuntimeType? m_enclosingType; 1450private MemberInfoCache<RuntimeType>? m_interfaceCache; 1451private MemberInfoCache<RuntimeType>? m_nestedClassesCache; 1463private RuntimeType? _genericTypeDefinition; 1467internal RuntimeTypeCache(RuntimeType runtimeType) 1580RuntimeModule module = ((RuntimeType)type).GetRuntimeModule(); 1594internal RuntimeType? GetEnclosingType() 1599RuntimeType enclosingType = RuntimeTypeHandle.GetDeclaringType(GetRuntimeType()); 1601m_enclosingType = enclosingType ?? (RuntimeType)typeof(void); 1607internal RuntimeType GetRuntimeType() => m_runtimeType; 1619for (RuntimeType? t = m_runtimeType; t != null; t = t.GetBaseType()) 1644internal RuntimeType GetGenericTypeDefinition() 1651RuntimeType CacheGenericDefinition() 1653RuntimeType genericDefinition = null!; 1660RuntimeType type = m_runtimeType; 1748internal RuntimeType[] GetInterfaceList(MemberListType listType, string? name) 1753internal RuntimeType[] GetNestedTypeList(MemberListType listType, string? name) 1758internal MethodBase GetMethod(RuntimeType declaringType, RuntimeMethodHandleInternal method) 1764internal MethodBase GetConstructor(RuntimeType declaringType, RuntimeMethodHandleInternal constructor) 1794internal static MethodBase? GetMethodBase(RuntimeType? reflectedType, IRuntimeMethodInfo methodHandle) 1804internal static MethodBase? GetMethodBase(RuntimeType? reflectedType, RuntimeMethodHandleInternal methodHandle) 1819RuntimeType declaredType = RuntimeMethodHandle.GetDeclaringType(methodHandle); 1821RuntimeType[]? methodInstantiation = null; 1857RuntimeType declaringDefinition = (RuntimeType)declaredType.GetGenericTypeDefinition(); 1859RuntimeType? baseType = reflectedType; 1863RuntimeType baseDefinition = baseType; 1866baseDefinition = (RuntimeType)baseDefinition.GetGenericTypeDefinition(); 1944internal static FieldInfo GetFieldInfo(RuntimeType? reflectedType, IRuntimeFieldInfo field) 1955RuntimeType declaredType = RuntimeFieldHandle.GetApproxDeclaringType(fieldHandle); 1975private static RuntimePropertyInfo GetPropertyInfo(RuntimeType reflectedType, int tkProperty) 1992internal static void ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception? e) 1994RuntimeType[]? typeContext = null; 1995RuntimeType[]? methodContext = null; 1996RuntimeType[] genericParameters; 2000RuntimeType genericTypeDefinition = (RuntimeType)definition; 2010RuntimeType? declaringType = (RuntimeType?)genericMethodDefinition.DeclaringType; 2229Debug.Assert(type is RuntimeType); 2391internal static readonly RuntimeType ValueType = (RuntimeType)typeof(ValueType); 2393private static readonly RuntimeType ObjectType = (RuntimeType)typeof(object); 2394private static readonly RuntimeType StringType = (RuntimeType)typeof(string); 2417return (o is RuntimeType t) && (t.m_handle == m_handle); 2624RuntimeType[] cache = Cache.GetNestedTypeList(listType, name); 2629RuntimeType nestedClass = cache[i]; 2674RuntimeType[] candidates = Cache.GetInterfaceList(MemberListType.All, null); 2722RuntimeType? ifaceRtType = interfaceType as RuntimeType; 2762RuntimeType reflectedType = RuntimeMethodHandle.GetDeclaringType(classRtMethodHandle); 2986RuntimeType[] cache = Cache.GetInterfaceList(listType, name); 2988RuntimeType? match = null; 2992RuntimeType iface = cache[i]; 3015RuntimeType[] cache = Cache.GetNestedTypeList(listType, name); 3017RuntimeType? match = null; 3021RuntimeType nestedType = cache[i]; 3121RuntimeType? runtimeType = this; 3146private static RuntimeMethodInfo? GetMethodWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo method) 3162private static RuntimeConstructorInfo? GetConstructorWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo constructor) 3178private static RuntimePropertyInfo? GetPropertyWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo property) 3194private static RuntimeFieldInfo? GetFieldWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo field) 3210private static RuntimeEventInfo? GetEventWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo eventInfo) 3226private static RuntimeType? GetNestedTypeWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo nestedType) 3228RuntimeType[] cache = runtimeType.Cache.GetNestedTypeList(MemberListType.CaseSensitive, nestedType.Name); 3232RuntimeType candidate = cache[i]; 3249RuntimeType thisType = this; 3277RuntimeType? rtType = type as RuntimeType; 3281RuntimeType? baseType = GetBaseType(); 3304if (!(other is RuntimeType otherRtType)) 3529internal RuntimeType[] GetGenericArgumentsInternal() 3548RuntimeType[] genericParameters = GetGenericArgumentsInternal(); 3552if (instantiation.Length == 1 && instantiation[0] is RuntimeType rt) 3566RuntimeType[] instantiationRuntimeType = new RuntimeType[instantiation.Length]; 3576RuntimeType? rtInstantiationElem = instantiationElem as RuntimeType; 3651public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => HasSameMetadataDefinitionAsCore<RuntimeType>(other); 3674private static extern bool CanValueSpecialCast(RuntimeType valueType, RuntimeType targetType); 3679RuntimeType srcType = pointer != null ? pointer.GetPointerType() : (RuntimeType)value.GetType();
src\System\RuntimeType.CreateUninitializedCache.CoreCLR.cs (4)
22private readonly RuntimeType _originalRuntimeType; 25internal CreateUninitializedCache(RuntimeType rt) 36internal object CreateUninitializedObject(RuntimeType rt) 56RuntimeType rt,
src\System\StubHelpers.cs (1)
1102int allocSize = Marshal.SizeOfHelper((RuntimeType)pManagedHome.GetType(), false);
src\System\Type.CoreCLR.cs (1)
83internal static extern RuntimeType GetTypeFromHandleUnsafe(IntPtr handle);