1 interface inheriting from ITypeDefinition
Microsoft.CodeAnalysis (1)
PEWriter\Types.cs (1)
269internal interface INamedTypeDefinition : ITypeDefinition, INamedTypeReference
2 implementations of ITypeDefinition
Microsoft.CodeAnalysis (2)
Emit\EditAndContinue\DeletedSourceTypeDefinition.cs (2)
18internal sealed class DeletedSourceTypeDefinition : DeletedSourceDefinition<ITypeDefinition>, ITypeDefinition
159 references to ITypeDefinition
Microsoft.CodeAnalysis (159)
CodeGen\PrivateImplementationDetails.cs (2)
602public Cci.ITypeDefinition ContainingTypeDefinition => _containingType; 663public Cci.ITypeDefinition ContainingTypeDefinition => _containingType;
Emit\AnonymousTypeValue.cs (2)
14public readonly Cci.ITypeDefinition Type; 16public AnonymousTypeValue(string name, int uniqueIndex, Cci.ITypeDefinition type)
Emit\CommonPEModuleBuilder.cs (2)
289public abstract IEnumerable<(Cci.ITypeDefinition, ImmutableArray<Cci.DebugSourceDocument>)> GetTypeToDebugDocumentMap(EmitContext context); 756noPiaIndexer?.Visit((Cci.ITypeDefinition)type);
Emit\EditAndContinue\DeletedPEMethodDefinition.cs (1)
101public Cci.ITypeDefinition ContainingTypeDefinition
Emit\EditAndContinue\DeletedSourceDefinition.cs (3)
19private readonly Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> _typesUsedByDeletedMembers; 29protected DeletedSourceDefinition(T oldDefinition, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers) 59if (typeReference is ITypeDefinition typeDef)
Emit\EditAndContinue\DeletedSourceGenericParameter.cs (4)
17public DeletedSourceGenericParameter(IGenericMethodParameter oldParameter, DeletedSourceMethodDefinition method, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers) 75public ITypeDefinition? AsTypeDefinition(EmitContext context) 88public ITypeDefinition? GetResolvedType(EmitContext context) 90return (ITypeDefinition?)WrapType(OldDefinition.GetResolvedType(context));
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (2)
21public DeletedSourceMethodDefinition(IMethodDefinition oldMethod, MethodDefinitionHandle handle, ImmutableArray<byte> bodyIL, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers) 77public ITypeDefinition ContainingTypeDefinition => throw ExceptionUtilities.Unreachable();
Emit\EditAndContinue\DeletedSourceParameterDefinition.cs (1)
16public DeletedSourceParameterDefinition(IParameterDefinition oldParameter, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourceTypeDefinition.cs (4)
20public DeletedSourceTypeDefinition(ITypeDefinition oldDefinition, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers) 97public ITypeDefinition? AsTypeDefinition(EmitContext context) 102public ITypeDefinition? GetResolvedType(EmitContext context)
Emit\EditAndContinue\DeltaMetadataWriter.cs (22)
35private readonly List<ITypeDefinition> _changedTypeDefs; 37private readonly Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>> _deletedTypeMembers; 38private readonly IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> _deletedMethodDefs; 40private readonly DefinitionIndex<ITypeDefinition> _typeDefs; 78IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> deletedMethodDefs, 102_changedTypeDefs = new List<ITypeDefinition>(); 103_deletedTypeMembers = new Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 105_typeDefs = new DefinitionIndex<ITypeDefinition>(this.TryGetExistingTypeDefIndex, sizes[(int)TableIndex.TypeDef]); 294foreach (var def in _changedTypeDefs) 335protected override bool TryGetTypeDefinitionHandle(ITypeDefinition def, out TypeDefinitionHandle handle) 342protected override TypeDefinitionHandle GetTypeDefinitionHandle(ITypeDefinition def) 347protected override ITypeDefinition GetTypeDef(TypeDefinitionHandle handle) 352protected override IReadOnlyList<ITypeDefinition> GetTypeDefs() 495internal static IReadOnlyDictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>> CreateDeletedMethodsDefs(EmitContext context, SymbolChanges changes) 497var result = new Dictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 498var typesUsedByDeletedMembers = new Dictionary<ITypeDefinition, DeletedSourceTypeDefinition>(ReferenceEqualityComparer.Instance); 507void recurse(ITypeDefinition typeDef) 521ArrayBuilder<IMethodDefinition>? getDeletedMethodDefs(ITypeDefinition typeDef) 590protected override void CreateIndicesForNonTypeMembers(ITypeDefinition typeDef) 1604private bool TryGetExistingTypeDefIndex(ITypeDefinition item, out int index) 1823private readonly IReadOnlyDictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>> _deletedTypeMembers; 1899public override void Visit(ITypeDefinition typeDefinition)
Emit\EditAndContinue\EmitBaseline.cs (4)
177typesAdded: new Dictionary<Cci.ITypeDefinition, int>(), 235internal readonly IReadOnlyDictionary<Cci.ITypeDefinition, int> TypesAdded; 298IReadOnlyDictionary<Cci.ITypeDefinition, int> typesAdded, 397IReadOnlyDictionary<Cci.ITypeDefinition, int> typesAdded,
Emit\EditAndContinue\SymbolChanges.cs (2)
225return (def is ITypeDefinition) ? SymbolChange.ContainsChanges : SymbolChange.None; 334var namespaceTypeDef = (symbol.GetCciAdapter() as ITypeDefinition)?.AsNamespaceTypeDefinition(context);
Emit\EditAndContinue\SymbolMatcher.cs (5)
114var type = (Cci.ITypeDefinition?)MapDefinition(value.Type); 128var delegateTypeDef = (Cci.ITypeDefinition?)MapDefinition(value.Delegate); 144value.Name, value.UniqueIndex, (Cci.ITypeDefinition?)MapDefinition(value.Type) ?? throw ExceptionUtilities.UnexpectedValue(value.Type))));
Emit\ErrorType.cs (2)
84Cci.ITypeDefinition Cci.ITypeReference.GetResolvedType(EmitContext context) 163Cci.ITypeDefinition Cci.ITypeReference.AsTypeDefinition(EmitContext context)
Emit\NoPia\CommonEmbeddedEvent.cs (1)
156Cci.ITypeDefinition Cci.ITypeDefinitionMember.ContainingTypeDefinition
Emit\NoPia\CommonEmbeddedField.cs (1)
160Cci.ITypeDefinition Cci.ITypeDefinitionMember.ContainingTypeDefinition
Emit\NoPia\CommonEmbeddedMethod.cs (1)
238Cci.ITypeDefinition Cci.ITypeDefinitionMember.ContainingTypeDefinition => ContainingType;
Emit\NoPia\CommonEmbeddedProperty.cs (1)
184Cci.ITypeDefinition Cci.ITypeDefinitionMember.ContainingTypeDefinition
Emit\NoPia\CommonEmbeddedType.cs (29)
238Cci.ITypeReference Cci.ITypeDefinition.GetBaseClass(EmitContext context) 243IEnumerable<Cci.IEventDefinition> Cci.ITypeDefinition.GetEvents(EmitContext context) 267IEnumerable<Cci.MethodImplementation> Cci.ITypeDefinition.GetExplicitImplementationOverrides(EmitContext context) 272IEnumerable<Cci.IFieldDefinition> Cci.ITypeDefinition.GetFields(EmitContext context) 296IEnumerable<Cci.IGenericTypeParameter> Cci.ITypeDefinition.GenericParameters 304ushort Cci.ITypeDefinition.GenericParameterCount 312bool Cci.ITypeDefinition.HasDeclarativeSecurity 321IEnumerable<Cci.TypeReferenceWithAttributes> Cci.ITypeDefinition.Interfaces(EmitContext context) 326bool Cci.ITypeDefinition.IsAbstract 334bool Cci.ITypeDefinition.IsBeforeFieldInit 342bool Cci.ITypeDefinition.IsComObject 350bool Cci.ITypeDefinition.IsGeneric 358bool Cci.ITypeDefinition.IsInterface 366bool Cci.ITypeDefinition.IsDelegate 374bool Cci.ITypeDefinition.IsRuntimeSpecial 382bool Cci.ITypeDefinition.IsSerializable 390bool Cci.ITypeDefinition.IsSpecialName 398bool Cci.ITypeDefinition.IsWindowsRuntimeImport 406bool Cci.ITypeDefinition.IsSealed 414System.Runtime.InteropServices.LayoutKind Cci.ITypeDefinition.Layout 423ushort Cci.ITypeDefinition.Alignment 432uint Cci.ITypeDefinition.SizeOf 441IEnumerable<Cci.IMethodDefinition> Cci.ITypeDefinition.GetMethods(EmitContext context) 486IEnumerable<Cci.INestedTypeDefinition> Cci.ITypeDefinition.GetNestedTypes(EmitContext context) 491IEnumerable<Cci.IPropertyDefinition> Cci.ITypeDefinition.GetProperties(EmitContext context) 515IEnumerable<Cci.SecurityAttribute> Cci.ITypeDefinition.SecurityAttributes 524System.Runtime.InteropServices.CharSet Cci.ITypeDefinition.StringFormat 579Cci.ITypeDefinition Cci.ITypeReference.GetResolvedType(EmitContext context) 658Cci.ITypeDefinition Cci.ITypeReference.AsTypeDefinition(EmitContext context)
Emit\NoPia\CommonEmbeddedTypeParameter.cs (2)
140Cci.ITypeDefinition Cci.ITypeReference.GetResolvedType(EmitContext context) 198Cci.ITypeDefinition Cci.ITypeReference.AsTypeDefinition(EmitContext context)
Emit\NoPia\VtblGap.cs (3)
13public readonly Cci.ITypeDefinition ContainingType; 16public VtblGap(Cci.ITypeDefinition containingType, string name) 148Cci.ITypeDefinition Cci.ITypeDefinitionMember.ContainingTypeDefinition
Emit\SynthesizedDelegateValue.cs (2)
11public readonly ITypeDefinition Delegate; 13public SynthesizedDelegateValue(ITypeDefinition @delegate)
NativePdbWriter\SymWriterMetadataProvider.cs (1)
39ITypeDefinition t = _writer.GetTypeDefinition(typeDefinitionToken);
PEWriter\FullMetadataWriter.cs (13)
20private readonly DefinitionIndex<ITypeDefinition> _typeDefs; 28private readonly Dictionary<ITypeDefinition, int> _fieldDefIndex; 29private readonly Dictionary<ITypeDefinition, int> _methodDefIndex; 93_typeDefs = new DefinitionIndex<ITypeDefinition>(numTypeDefsGuess); 101_fieldDefIndex = new Dictionary<ITypeDefinition, int>(numTypeDefsGuess, ReferenceEqualityComparer.Instance); 102_methodDefIndex = new Dictionary<ITypeDefinition, int>(numTypeDefsGuess, ReferenceEqualityComparer.Instance); 129protected override bool TryGetTypeDefinitionHandle(ITypeDefinition def, out TypeDefinitionHandle handle) 137protected override TypeDefinitionHandle GetTypeDefinitionHandle(ITypeDefinition def) 142protected override ITypeDefinition GetTypeDef(TypeDefinitionHandle handle) 147protected override IReadOnlyList<ITypeDefinition> GetTypeDefs() 335ITypeDefinition? lastParent = null; 353ITypeDefinition? lastParent = null; 369protected override void CreateIndicesForNonTypeMembers(ITypeDefinition typeDef)
PEWriter\InheritedTypeParameter.cs (6)
16private readonly ITypeDefinition _inheritingType; 19internal InheritedTypeParameter(ushort index, ITypeDefinition inheritingType, IGenericTypeParameter parentParameter) 28public ITypeDefinition DefiningType 187public ITypeDefinition? AsTypeDefinition(EmitContext context) 189return this as ITypeDefinition; 234public ITypeDefinition GetResolvedType(EmitContext context)
PEWriter\Members.cs (1)
841ITypeDefinition ContainingTypeDefinition { get; }
PEWriter\MetadataVisitor.cs (4)
547public void Visit(IEnumerable<ITypeDefinition> types) 549foreach (ITypeDefinition type in types) 555public abstract void Visit(ITypeDefinition typeDefinition); 559ITypeDefinition? nestedType = typeMember as INestedTypeDefinition;
PEWriter\MetadataWriter.cs (22)
171protected abstract bool TryGetTypeDefinitionHandle(ITypeDefinition def, out TypeDefinitionHandle handle); 176protected abstract TypeDefinitionHandle GetTypeDefinitionHandle(ITypeDefinition def); 182protected abstract ITypeDefinition GetTypeDef(TypeDefinitionHandle handle); 188protected abstract IReadOnlyList<ITypeDefinition> GetTypeDefs(); 392protected abstract void CreateIndicesForNonTypeMembers(ITypeDefinition typeDef); 498var typesToIndex = new Queue<ITypeDefinition>(); 507createIndices((ITypeDefinition)hotReloadException.GetCciAdapter(), typesToIndex); 515void createIndices(ITypeDefinition typeDef, Queue<ITypeDefinition> typesToIndex) 535protected IEnumerable<IGenericTypeParameter> GetConsolidatedTypeParameters(ITypeDefinition typeDef) 551private List<IGenericTypeParameter> GetConsolidatedTypeParameters(ITypeDefinition typeDef, ITypeDefinition owner) 927ITypeDefinition parentTypeDef = memberRef.GetContainingType(Context).AsTypeDefinition(Context); 1460internal TypeAttributes GetTypeAttributes(ITypeDefinition typeDef) 1465public static TypeAttributes GetTypeAttributes(ITypeDefinition typeDef, EmitContext context) 1623internal ITypeDefinition GetTypeDefinition(int token) 1663var typeDefinition = typeReference.AsTypeDefinition(this.Context); 1678ITypeDefinition typeDef => (EntityHandle)GetTypeDefinitionHandle(typeDef), 2157foreach (ITypeDefinition typeDef in this.GetTypeDefs()) 2496foreach (ITypeDefinition typeDef in this.GetTypeDefs()) 2793foreach (ITypeDefinition typeDef in this.GetTypeDefs()) 2809foreach (ITypeDefinition typeDef in this.GetTypeDefs())
PEWriter\ModifiedTypeReference.cs (2)
55ITypeDefinition ITypeReference.GetResolvedType(EmitContext context) 138ITypeDefinition? ITypeReference.AsTypeDefinition(EmitContext context)
PEWriter\ReferenceIndexerBase.cs (2)
271public void VisitTypeDefinitionNoMembers(ITypeDefinition typeDefinition) 297public override void Visit(ITypeDefinition typeDefinition)
PEWriter\RootModuleStaticConstructor.cs (2)
19public RootModuleStaticConstructor(ITypeDefinition containingTypeDefinition, ImmutableArray<byte> il) 29public ITypeDefinition ContainingTypeDefinition { get; }
PEWriter\RootModuleType.cs (6)
46public ITypeDefinition ResolvedType 198IEnumerable<IGenericTypeParameter> ITypeDefinition.GenericParameters 203ushort ITypeDefinition.GenericParameterCount 211IEnumerable<SecurityAttribute> ITypeDefinition.SecurityAttributes 231ITypeDefinition ITypeReference.GetResolvedType(EmitContext context) 317ITypeDefinition ITypeReference.AsTypeDefinition(EmitContext context)
PEWriter\Types.cs (4)
233new ITypeDefinition DefiningType { get; } 368public Cci.ITypeDefinition ContainingType 623ITypeDefinition? GetResolvedType(EmitContext context); 644ITypeDefinition? AsTypeDefinition(EmitContext context);