3 types derived from DefType
System.Private.TypeLoader (3)
Internal\TypeSystem\CanonTypes.Runtime.cs (1)
12public partial class CanonBaseType : DefType { }
Internal\TypeSystem\RuntimeNoMetadataType.cs (1)
27internal class NoMetadataType : DefType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\InstantiatedType.cs (1)
14public sealed partial class InstantiatedType : MetadataType
224 references to DefType
System.Private.TypeLoader (224)
Internal\Runtime\TypeLoader\CanonicallyEquivalentEntryLocator.cs (2)
19private DefType _defType; 37internal CanonicallyEquivalentEntryLocator(DefType typeToFind)
Internal\Runtime\TypeLoader\EETypeCreator.cs (2)
628DefType typeAsDefType = type as DefType;
Internal\Runtime\TypeLoader\GenericDictionaryCell.cs (6)
38th = builder.GetRuntimeTypeHandle(((DefType)type).Instantiation[0]); 62internal DefType Type; 179internal DefType ConstraintType; 487if (type is DefType) 488cell = new UnwrapNullableTypeCell() { Type = (DefType)type }; 587ConstraintType = (DefType)constraintType,
Internal\Runtime\TypeLoader\NativeLayoutInfoLoadContext.cs (5)
32private DefType GetInstantiationType(ref NativeParser parser, uint arity) 34DefType typeDefinition = (DefType)GetType(ref parser); 187DefType containingType = (DefType)GetType(ref parser);
Internal\Runtime\TypeLoader\NativeLayoutInterfacesAlgorithm.cs (9)
18public override DefType[] ComputeRuntimeInterfaces(TypeDesc type) 25DefType[] interfaces = new DefType[totalInterfaces]; 33foreach (var baseInterface in type.BaseType.RuntimeInterfaces) 55DefType interfaceTypeAsDefType = (DefType)interfaceType; 64foreach (var inheritedInterface in interfaceTypeAsDefType.RuntimeInterfaces) 83private static bool InterfaceInSet(DefType[] interfaces, int numInterfaces, DefType interfaceType)
Internal\Runtime\TypeLoader\NoMetadataRuntimeInterfacesAlgorithm.cs (4)
16public override DefType[] ComputeRuntimeInterfaces(TypeDesc type) 19DefType[] interfaces = new DefType[numInterfaces]; 24interfaces[i] = (DefType)itfType;
Internal\Runtime\TypeLoader\TypeBuilder.cs (30)
131if ((type is DefType) || (type is ArrayType) || (type is PointerType) || (type is ByRefType) || (type is FunctionPointerType)) 170if (type is DefType typeAsDefType) 184Debug.Assert(state.TemplateType == null || (state.TemplateType is DefType && !state.TemplateType.RuntimeTypeHandle.IsNull())); 246foreach (DefType interfaceType in type.RuntimeInterfaces) 257DefType baseType = type.BaseType; 289nonTemplateMethod = (InstantiatedMethod)method.Context.ResolveGenericMethodInstantiation(true, method.AsyncVariant, method.ReturnDroppingAsyncThunk, (DefType)method.OwningType, method.NameAndSignature, method.Instantiation); 512Debug.Assert(type is DefType || type is ArrayType || type is PointerType || type is ByRefType || type is FunctionPointerType); 564public static DefType GetBaseTypeUsingRuntimeTypeHandle(TypeDesc type) 573return (DefType)type.Context.ResolveRuntimeTypeHandle(thBaseTypeTemplate); 577public static DefType GetBaseTypeThatIsCorrectForMDArrays(TypeDesc type) 592DefType[] interfaces = state.RuntimeInterfaces; 652private void CopyDictionaryFromTypeToAppropriateSlotInDerivedType(DefType baseType, TypeBuilderState derivedTypeState) 680DefType baseType = GetBaseTypeThatIsCorrectForMDArrays(type); 700if (type is DefType typeAsDefType) 782DefType typeAsDefType = _typesThatNeedTypeHandles[i] as DefType; 817if (_typesThatNeedTypeHandles[i] is DefType) 996private static DefType GetExactDeclaringType(DefType srcDefType, DefType dstDefType) 1047DefType declaringType = (DefType)typeSystemContext.ResolveRuntimeTypeHandle(declaringTypeHandle); 1057if (typeContext is DefType) 1059nlilContext._typeArgumentHandles = ((DefType)typeContext).Instantiation; 1074DefType actualContext = GetExactDeclaringType((DefType)typeContext, (DefType)declaringType); 1129DefType genericDef = (DefType)context.ResolveRuntimeTypeHandle(genericTypeDefinitionHandle); 1131DefType typeBeingLoaded = context.ResolveGenericInstantiation(genericDef, genericArgs);
Internal\Runtime\TypeLoader\TypeBuilderState.cs (5)
136if (type is DefType) 138nativeLayoutInfoLoadContext._typeArgumentHandles = ((DefType)type).Instantiation; 175public DefType[] RuntimeInterfaces 380DefType defType = TypeBeingBuilt as DefType;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs (1)
313nonTemplateMethod = (InstantiatedMethod)method.Context.ResolveGenericMethodInstantiation(true, method.AsyncVariant, method.ReturnDroppingAsyncThunk, (DefType)method.OwningType, method.NameAndSignature, method.Instantiation);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericTypesLookup.cs (2)
95private DefType _typeToLookup; 99internal GenericTypeLookupData(DefType typeToLookup)
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.cs (2)
382DefType declaringType = (DefType)context.ResolveRuntimeTypeHandle(declaringTypeHandle);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.GVMResolution.cs (13)
48internal static InstantiatedMethod GVMLookupForSlotWorker(DefType targetType, InstantiatedMethod slotMethod) 56DefType currentType = targetType; 125DefType targetType = (DefType)context.ResolveRuntimeTypeHandle(type); 163private static InstantiatedMethod FindMatchingInterfaceSlot(NativeFormatModuleInfo module, NativeReader nativeLayoutReader, ref NativeParser entryParser, ref ExternalReferencesTable extRefs, InstantiatedMethod slotMethod, DefType targetType, bool variantDispatch, bool defaultMethods) 254DefType interfaceImplType; 260interfaceImplType = (DefType)context.ResolveRuntimeTypeHandle(targetTypeHandle); 272interfaceImplType = (DefType)interfaceImplType.BaseType; 278interfaceImplType = (DefType)currentIfaceType; 287foreach (DefType instIntf in targetType.RuntimeInterfaces) 293foreach (DefType intfOnIntf in instIntf.RuntimeInterfaces) 329private static InstantiatedMethod ResolveInterfaceGenericVirtualMethodSlot(DefType targetType, InstantiatedMethod slotMethod, bool lookForDefaultImplementation) 455private static InstantiatedMethod ResolveGenericVirtualMethodTarget(DefType targetType, InstantiatedMethod slotMethod)
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.LdTokenResultLookup.cs (2)
201DefType type = (DefType)context.ResolveRuntimeTypeHandle(declaringTypeHandle);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.Metadata.cs (1)
415if (type is DefType defType)
Internal\Runtime\TypeLoader\TypeLoaderTypeSystemContext.cs (29)
24protected override RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForDefType(DefType type) 39protected internal sealed override bool IsIDynamicInterfaceCastableInterface(DefType type) 51public override DefType GetWellKnownType(WellKnownType wellKnownType, bool throwIfNotFound = true) 56return (DefType)ResolveRuntimeTypeHandle(typeof(void).TypeHandle); 59return (DefType)ResolveRuntimeTypeHandle(typeof(bool).TypeHandle); 62return (DefType)ResolveRuntimeTypeHandle(typeof(char).TypeHandle); 65return (DefType)ResolveRuntimeTypeHandle(typeof(sbyte).TypeHandle); 68return (DefType)ResolveRuntimeTypeHandle(typeof(byte).TypeHandle); 71return (DefType)ResolveRuntimeTypeHandle(typeof(short).TypeHandle); 74return (DefType)ResolveRuntimeTypeHandle(typeof(ushort).TypeHandle); 77return (DefType)ResolveRuntimeTypeHandle(typeof(int).TypeHandle); 80return (DefType)ResolveRuntimeTypeHandle(typeof(uint).TypeHandle); 83return (DefType)ResolveRuntimeTypeHandle(typeof(long).TypeHandle); 86return (DefType)ResolveRuntimeTypeHandle(typeof(ulong).TypeHandle); 89return (DefType)ResolveRuntimeTypeHandle(typeof(IntPtr).TypeHandle); 92return (DefType)ResolveRuntimeTypeHandle(typeof(UIntPtr).TypeHandle); 95return (DefType)ResolveRuntimeTypeHandle(typeof(float).TypeHandle); 98return (DefType)ResolveRuntimeTypeHandle(typeof(double).TypeHandle); 101return (DefType)ResolveRuntimeTypeHandle(typeof(ValueType).TypeHandle); 104return (DefType)ResolveRuntimeTypeHandle(typeof(Enum).TypeHandle); 107return (DefType)ResolveRuntimeTypeHandle(typeof(Nullable<>).TypeHandle); 110return (DefType)ResolveRuntimeTypeHandle(typeof(object).TypeHandle); 113return (DefType)ResolveRuntimeTypeHandle(typeof(string).TypeHandle); 116return (DefType)ResolveRuntimeTypeHandle(typeof(Array).TypeHandle); 119return (DefType)ResolveRuntimeTypeHandle(typeof(MulticastDelegate).TypeHandle); 122return (DefType)ResolveRuntimeTypeHandle(typeof(RuntimeTypeHandle).TypeHandle); 125return (DefType)ResolveRuntimeTypeHandle(typeof(RuntimeMethodHandle).TypeHandle); 128return (DefType)ResolveRuntimeTypeHandle(typeof(RuntimeFieldHandle).TypeHandle); 131return (DefType)ResolveRuntimeTypeHandle(typeof(Exception).TypeHandle);
Internal\Runtime\TypeLoader\TypeSystemExtensions.cs (2)
21DefType typeAsDefType = type as DefType;
Internal\TypeSystem\ExceptionTypeNameFormatter.Runtime.cs (2)
8private static string GetTypeName(DefType type) 16private static string GetTypeNamespace(DefType type)
Internal\TypeSystem\MethodDesc.Runtime.cs (1)
52OwningType == (OwningType.ConvertToCanonForm(CanonicalFormKind.Specific) as DefType);
Internal\TypeSystem\RuntimeMethodDesc.Canon.cs (2)
22DefType canonicalizedTypeOfTargetMethod = (DefType)OwningType.ConvertToCanonForm(kind);
Internal\TypeSystem\RuntimeMethodDesc.cs (4)
17public RuntimeMethodDesc(bool unboxingStub, bool asyncVariant, bool returnDroppingAsyncThunk, DefType owningType, 68private DefType _owningType; 140return Context.ResolveRuntimeMethod(UnboxingStub, AsyncVariant, ReturnDroppingAsyncThunk, (DefType)owningTypeDefinition, _nameAndSignature); 150method = instantiatedOwningType.Context.ResolveRuntimeMethod(UnboxingStub, AsyncVariant, ReturnDroppingAsyncThunk, (DefType)instantiatedOwningType, _nameAndSignature);
Internal\TypeSystem\RuntimeNoMetadataType.cs (10)
32private DefType _genericTypeDefinitionAsDefType; 36private DefType _baseType; 65public unsafe NoMetadataType(TypeSystemContext context, RuntimeTypeHandle genericTypeDefinition, DefType genericTypeDefinitionAsDefType, Instantiation instantiation, int hashcode) 70private void Init(TypeSystemContext context, RuntimeTypeHandle genericTypeDefinition, DefType genericTypeDefinitionAsDefType, Instantiation instantiation, int hashcode) 106public override DefType BaseType 122DefType baseType = !baseTypeHandle.IsNull() ? (DefType)Context.ResolveRuntimeTypeHandle(baseTypeHandle) : null; 149SetBaseType((DefType)nativeLayoutInfoLoadContext.GetType(ref baseTypeParser)); 161public void SetBaseType(DefType baseType) 260return Context.ResolveGenericInstantiation((DefType)openType, canonInstantiation);
Internal\TypeSystem\TypeDesc.Runtime.cs (1)
69if (type is DefType typeAsDefType)
Internal\TypeSystem\TypeSystemContext.Runtime.cs (14)
209DefType typeDef = (DefType)ResolveRuntimeTypeHandle(typeDefRuntimeTypeHandle); 281private DefType _typeDefinition; 285public GenericTypeInstanceKey(DefType typeDefinition, Instantiation instantiation) 326private DefType _owningType; 330public RuntimeMethodKey(bool unboxingStub, bool asyncVariant, bool returnDroppingAsyncThunk, DefType owningType, MethodNameAndSignature nameAndSignature) 432MethodDesc typicalMethod = key._owningType.Context.ResolveRuntimeMethod(key._unboxingStub, key._asyncVariant, key._returnDroppingAsyncThunk, (DefType)key._owningType.GetTypeDefinition(), key._methodNameAndSignature); 449internal MethodDesc ResolveRuntimeMethod(bool unboxingStub, bool asyncVariant, bool returnDroppingAsyncThunk, DefType owningType, MethodNameAndSignature nameAndSignature) 455private LowLevelDictionary<GenericTypeInstanceKey, DefType> _genericTypeInstances; 462public DefType ResolveGenericInstantiation(DefType typeDef, Instantiation arguments) 466_genericTypeInstances ??= new LowLevelDictionary<GenericTypeInstanceKey, DefType>(); 470DefType result; 486public MethodDesc ResolveGenericMethodInstantiation(bool unboxingStub, bool asyncVariant, bool returnDroppingAsyncThunk, DefType owningType, MethodNameAndSignature nameAndSignature, Instantiation methodInstantiation)
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\CanonTypes.cs (6)
12using MetadataType = Internal.TypeSystem.DefType; 58public override MetadataType ContainingType => null; 94public override MetadataType BaseType 98return (MetadataType)Context.GetWellKnownType(WellKnownType.Object); 178public override MetadataType BaseType 183return (MetadataType)Context.GetWellKnownType(WellKnownType.ValueType);
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\InstantiatedType.Canon.cs (3)
5using MetadataType = Internal.TypeSystem.DefType; 32MetadataType openType = (MetadataType)GetTypeDefinition();
src\runtime\src\coreclr\tools\Common\TypeSystem\Canon\TypeSystemContext.Canon.cs (1)
96public DefType GetCanonType(string name)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ArrayType.cs (1)
29public override DefType BaseType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\BaseTypeRuntimeInterfacesAlgorithm.cs (1)
24public override DefType[] ComputeRuntimeInterfaces(TypeDesc _type)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\CastingHelper.cs (2)
407foreach (var interfaceType in thisType.RuntimeInterfaces) 426foreach (var interfaceType in thisType.RuntimeInterfaces)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\DefType.cs (1)
41public virtual DefType ContainingType => null;
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FieldDesc.cs (3)
10using MetadataType = Internal.TypeSystem.DefType; 52public abstract MetadataType OwningType 111DefType owningType = field.OwningType;
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FieldForInstantiatedType.cs (2)
8using MetadataType = Internal.TypeSystem.DefType; 33public override MetadataType OwningType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\InstantiatedType.cs (10)
9using MetadataType = Internal.TypeSystem.DefType; 16private MetadataType _typeDef; 19internal InstantiatedType(MetadataType typeDef, Instantiation instantiation) 63private MetadataType _baseType /* = this */; 65private MetadataType InitializeBaseType() 67var uninst = _typeDef.BaseType; 69return (_baseType = (uninst != null) ? (MetadataType)uninst.InstantiateSignature(_instantiation, default(Instantiation)) : null); 72public override MetadataType BaseType 201DefType typeInHierarchy = this; 300public override MetadataType ContainingType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\MethodDesc.cs (1)
510/// Gets the type that owns this method. This will be a <see cref="DefType"/> or
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ModuleDesc.cs (5)
8using MetadataType = Internal.TypeSystem.DefType; 37public MetadataType GetType(ReadOnlySpan<byte> nameSpace, ReadOnlySpan<byte> name, bool throwIfNotFound = true) 39return (MetadataType)GetType(nameSpace, name, throwIfNotFound ? NotFoundBehavior.Throw : NotFoundBehavior.ReturnNull); 50public abstract MetadataType GetGlobalModuleType(); 55public abstract IEnumerable<MetadataType> GetAllTypes();
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\RuntimeInterfacesAlgorithm.cs (1)
23public abstract DefType[] ComputeRuntimeInterfaces(TypeDesc type);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TargetDetails.cs (2)
224public LayoutInt GetWellKnownTypeSize(DefType type) 263public LayoutInt GetWellKnownTypeAlignment(DefType type)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeDesc.cs (3)
250var baseType = this.BaseType; 422Debug.Assert(GetTypeFlags(TypeFlags.CategoryMask) <= TypeFlags.Interface == this is DefType); 445public virtual DefType BaseType
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeDesc.Interfaces.cs (5)
13private DefType[] _runtimeInterfaces; 19public DefType[] RuntimeInterfaces 32private DefType[] InitializeRuntimeInterfaces() 35DefType[] computedInterfaces = algorithm != null ? algorithm.ComputeRuntimeInterfaces(this) : Array.Empty<DefType>();
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeSystemContext.cs (8)
11using MetadataType = Internal.TypeSystem.DefType; 50public abstract DefType GetWellKnownType(WellKnownType wellKnownType, bool throwIfNotFound = true); 336return new InstantiatedType((MetadataType)key.TypeDef, key.Instantiation); 343public InstantiatedType GetInstantiatedType(MetadataType typeDef, Instantiation instantiation) 669return GetRuntimeInterfacesAlgorithmForDefType((DefType)type); 692protected virtual RuntimeInterfacesAlgorithm GetRuntimeInterfacesAlgorithmForDefType(DefType type) 757foreach (DefType interfaceType in typeDefinition.RuntimeInterfaces) 781protected internal abstract bool IsIDynamicInterfaceCastableInterface(DefType type);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\ExceptionTypeNameFormatter.cs (4)
77protected override void AppendNameForInstantiatedType(StringBuilder sb, DefType type) 92protected override void AppendNameForNamespaceType(StringBuilder sb, DefType type) 110protected override void AppendNameForNestedType(StringBuilder sb, DefType nestedType, DefType containingType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\TypeNameFormatter.cs (16)
43AppendName(sb, (DefType)type); 48public void AppendName(StringBuilder sb, DefType type) 56DefType containingType = type.ContainingType; 72protected abstract void AppendNameForNestedType(StringBuilder sb, DefType nestedType, DefType containingType); 73protected abstract void AppendNameForNamespaceType(StringBuilder sb, DefType type); 74protected abstract void AppendNameForInstantiatedType(StringBuilder sb, DefType type); 99_ => AppendName(sb, (DefType)type, options) 103public TState AppendName(StringBuilder sb, DefType type, TOptions options) 111DefType containingType = GetContainingType(type, options); 128protected abstract TState AppendNameForNestedType(StringBuilder sb, DefType nestedType, DefType containingType, TOptions options); 129protected abstract TState AppendNameForNamespaceType(StringBuilder sb, DefType type, TOptions options); 130protected abstract TState AppendNameForInstantiatedType(StringBuilder sb, DefType type, TOptions options); 132protected virtual DefType GetContainingType(DefType possibleInnerType, TOptions options)