22 types derived from EntityBase
Microsoft.DotNet.ILAssembler (22)
EntityRegistry.cs (22)
1992public abstract class TypeEntity : EntityBase 1996public sealed class LiteralTokenEntity(int token) : EntityBase 2149public sealed class GenericParameterEntity(GenericParameterAttributes attributes, string name) : EntityBase, INamed 2162public sealed class GenericParameterConstraintEntity(TypeEntity baseType) : EntityBase 2169public sealed class ModuleReferenceEntity(string name) : EntityBase 2174public sealed class MethodDefinitionEntity(TypeDefinitionEntity containingType, string name) : EntityBase, IHasHandle 2243public sealed class ParameterEntity(ParameterAttributes attributes, string? name, BlobBuilder marshallingDescriptor, int sequence) : EntityBase 2254public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 2267public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 2273public sealed class StandaloneSignatureEntity(BlobBuilder signature) : EntityBase 2278public sealed class DeclarativeSecurityAttributeEntity(DeclarativeSecurityAction action, BlobBuilder permissionSet) : EntityBase 2285public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 2298public sealed class MethodImplementationEntity(TypeDefinitionEntity type, EntityBase methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 2305public sealed class FieldDefinitionEntity(FieldAttributes attributes, TypeDefinitionEntity type, string name, BlobBuilder signature) : EntityBase 2324public sealed class InterfaceImplementationEntity(TypeDefinitionEntity type, TypeEntity interfaceType) : EntityBase 2330public sealed class EventEntity(EventAttributes attributes, TypeEntity? type, string name) : EntityBase 2339public sealed class PropertyEntity(PropertyAttributes attributes, BlobBuilder type, string name) : EntityBase 2350public sealed class FileEntity(string name) : EntityBase 2357public sealed class ModuleEntity : EntityBase 2362public abstract class AssemblyOrRefEntity(string name) : EntityBase 2382public sealed class ManifestResourceEntity(string name, uint offset) : EntityBase 2390public sealed class ExportedTypeEntity : EntityBase
128 references to EntityBase
Microsoft.DotNet.ILAssembler (128)
Actions\GrammarActions.BuildImage.cs (3)
793foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef)) 1076EntityRegistry.EntityBase coreScope = _entityRegistry.GetCoreLibraryResolutionScope(); 1104customAttr.Owner = (EntityRegistry.EntityBase?)_entityRegistry.Assembly
Actions\GrammarActions.Conversions.cs (1)
244private EntityRegistry.EntityBase? _pendingClassCustomAttributeOwner;
Actions\GrammarActions.CustomAttributes.Actions.cs (2)
177EntityRegistry.EntityBase constructor = MaterializeMethodReference(descriptor.Constructor); 233internal EntityRegistry.EntityBase MaterializeOwnerType(
Actions\GrammarActions.Declarations.Actions.cs (1)
139(EntityRegistry.EntityBase?)_lastFieldDefinition ?? _entityRegistry.Module;
Actions\GrammarActions.Instructions.cs (1)
430internal EntityRegistry.EntityBase ResolveMetadataToken(CILParser.MdtokenContext context)
Actions\GrammarActions.Instructions.References.cs (1)
123private static void WriteInstructionToken(CurrentMethodContext method, EntityRegistry.EntityBase entity)
Actions\GrammarActions.Manifest.ExportedTypes.cs (8)
97EntityRegistry.EntityBase? implementation, 144EntityRegistry.EntityBase? Implementation, 150EntityRegistry.EntityBase? implementation = null; 168EntityRegistry.EntityBase entity = ResolveMetadataToken(metadataToken.Token); 230private static EntityRegistry.EntityBase? ResolveBetterExportedTypeImplementation( 231EntityRegistry.EntityBase? current, 232EntityRegistry.EntityBase? candidate) 248static int GetImplementationPriority(EntityRegistry.EntityBase entity)
Actions\GrammarActions.Manifest.Resources.cs (3)
65EntityRegistry.EntityBase? implementation, 102EntityRegistry.EntityBase? Implementation, 108EntityRegistry.EntityBase? implementation = null;
Actions\GrammarActions.Manifest.Typedefs.cs (4)
62EntityRegistry.EntityBase? owner = attribute.Owner; 112private EntityRegistry.EntityBase? TryResolveTypedefAsMember(string alias) 124EntityRegistry.EntityBase Constructor, 126EntityRegistry.EntityBase? Owner)?
Actions\GrammarActions.Members.Class.cs (1)
391EntityRegistry.EntityBase? owner)
Actions\GrammarActions.Members.Fields.cs (1)
174internal EntityRegistry.EntityBase MaterializeFieldReference(
Actions\GrammarActions.MethodBodies.Directives.cs (1)
334EntityRegistry.EntityBase owner)
Actions\GrammarActions.MethodHeaders.Generics.cs (1)
14EntityRegistry.EntityBase owner,
Actions\GrammarActions.Signatures.cs (1)
8internal EntityRegistry.EntityBase MaterializeMethodReference(CILParser.MethodRefContext context)
Actions\GrammarActions.Signatures.References.cs (5)
66private EntityRegistry.EntityBase MaterializeMethodReference(MethodReferenceValue methodReference) 89private EntityRegistry.EntityBase MaterializeParsedMethodReference(ParsedMethodReferenceValue methodReference) 145private EntityRegistry.EntityBase MaterializeFieldReference(FieldReferenceValue fieldReference) 173private EntityRegistry.EntityBase MaterializeMemberReference(MemberReferenceValue memberReference) 205private EntityRegistry.EntityBase MaterializeOwnerType(OwnerTypeValue owner)
Actions\GrammarActions.Types.References.cs (2)
103EntityRegistry.EntityBase resolvedToken = ResolveMetadataToken(typeToken.Token); 169private EntityRegistry.EntityBase ResolveMetadataToken(int token)
CILParser.SemanticValues.Declarations.cs (2)
218internal CustomAttributeOwnerValue(EntityRegistry.EntityBase? owner) 223internal EntityRegistry.EntityBase? Owner { get; }
CILParser.SemanticValues.Manifest.cs (6)
204internal Member(EntityRegistry.EntityBase entity) 209internal EntityRegistry.EntityBase Entity { get; } 215EntityRegistry.EntityBase constructor, 217EntityRegistry.EntityBase? owner) 224internal EntityRegistry.EntityBase Constructor { get; } 228internal EntityRegistry.EntityBase? Owner { get; }
EntityRegistry.cs (71)
17private readonly Dictionary<TableIndex, List<EntityBase>> _seenEntities = new(); 19private readonly Dictionary<(EntityBase ResolutionScope, string Namespace, string Name), TypeReferenceEntity> _seenTypeRefs = new(); 88public IReadOnlyList<EntityBase> GetSeenEntities(TableIndex table) 94return Array.Empty<EntityBase>(); 218IReadOnlyList<EntityBase> typeSpecifications = GetSeenEntities(TableIndex.TypeSpec); 255EntityBase scope => scope.Handle 622static FieldDefinitionHandle GetFieldHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 625static MethodDefinitionHandle GetMethodHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 628static PropertyDefinitionHandle GetPropertyHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 631static EventDefinitionHandle GetEventHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 634static ParameterHandle GetParameterHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 637static EntityHandle GetHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex, TableIndex tokenType) 642foreach (var item in list) 653foreach (var item in otherList) 753public EntityBase GetCoreLibraryResolutionScope() 779public void RecordEntityInTable(TableIndex table, EntityBase entity) 781if (!_seenEntities.TryGetValue(table, out List<EntityBase>? entities)) 783_seenEntities[table] = entities = new List<EntityBase>(); 799where TEntity : EntityBase 813where TEntity : EntityBase 899public EntityBase ResolveHandleToEntity(EntityHandle entityHandle) 935public TypeReferenceEntity GetOrCreateTypeReference(EntityBase resolutionContext, TypeName name) 966EntityBase scope = resolutionContext; 1081private readonly IReadOnlyList<EntityBase>? _typeSpecifications; 1086public SignatureRewriter(List<TypeReferenceEntity> typeReferences, IReadOnlyList<EntityBase> typeSpecifications) 1305EntityBase resolutionScope = typeRef.ResolutionScope; 1572private void ResolveTypeSpecifications(MetadataBuilder builder, SignatureRewriter rewriter, IReadOnlyList<EntityBase> typeSpecifications) 1634IReadOnlyList<EntityBase> methodSpecifications = GetSeenEntities(TableIndex.MethodSpec); 1813public MethodSpecificationEntity CreateMethodSpecification(EntityBase method, BlobBuilder signature) 1832public CustomAttributeEntity CreateCustomAttribute(EntityBase constructor, BlobBuilder value) 1850if (toRemove.Count == 0 || !_seenEntities.TryGetValue(TableIndex.CustomAttribute, out List<EntityBase>? entities)) 1918public ExportedTypeEntity GetOrCreateExportedType(EntityBase? implementation, string @namespace, string name, Action<ExportedTypeEntity> onCreateType) 1952private List<EntityBase>? _handleAliases; 1976foreach (EntityBase alias in _handleAliases) 1983internal void AddHandleAlias(EntityBase alias) 2116public sealed class TypeReferenceEntity(EntityBase resolutionScope, string @namespace, string name) : TypeEntity, IHasReflectionNotation 2118public EntityBase ResolutionScope { get; } = resolutionScope; 2153public EntityBase? Owner { get; set; } 2254public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 2257public EntityBase Parent { get; private set; } = parent; 2267public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 2269public EntityBase Parent { get; } = parent; 2280public EntityBase? Parent { get; set; } 2285public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 2287public EntityBase? Owner { get; set; } 2288public EntityBase Constructor { get; } = constructor; 2298public sealed class MethodImplementationEntity(TypeDefinitionEntity type, EntityBase methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 2301public EntityBase MethodBody { get; } = methodBody; 2336public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 2347public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 2387public EntityBase? Implementation { get; set; } 2392public ExportedTypeEntity(string name, string @namespace, EntityBase? implementation) 2402public EntityBase? Implementation { get; }
PseudoCustomAttributes.cs (2)
28foreach (var entity in registry.GetSeenEntities(TableIndex.CustomAttribute)) 85public EntityRegistry.EntityBase Owner { get; } = ResolveOwner(registry, attribute.Owner!);
PseudoCustomAttributes.Identity.cs (7)
12private static bool TryGetAttributeTypeName(EntityRegistry.EntityBase constructor, out string @namespace, out string name) 41private static BlobBuilder? GetConstructorSignature(EntityRegistry.EntityBase constructor) => constructor switch 53private static EntityRegistry.EntityBase ResolveOwner(EntityRegistry registry, EntityRegistry.EntityBase owner) 110EntityRegistry.EntityBase? declaringType) => declaringType switch 117private static KnownAttribute? TryFindKnownAttribute(EntityRegistry.EntityBase constructor, string @namespace, string name) 143private static unsafe bool SignatureMatches(EntityRegistry.EntityBase constructor, KnownAttribute candidate)
PseudoCustomAttributes.KnownAttributes.cs (1)
212private static CaTargets GetTarget(EntityRegistry.EntityBase owner) => owner switch
PseudoCustomAttributes.MarshalAs.cs (3)
55foreach ((MethodSemanticsAttributes semantic, EntityRegistry.EntityBase accessor) in property.Accessors) 97foreach (var entity in registry.GetSeenEntities(TableIndex.TypeDef)) 115EntityRegistry.EntityBase accessor,