21 types derived from EntityBase
ILAssembler (21)
EntityRegistry.cs (21)
1130public abstract class TypeEntity : EntityBase 1257public sealed class GenericParameterEntity(GenericParameterAttributes attributes, string name) : EntityBase, INamed 1270public sealed class GenericParameterConstraintEntity(TypeEntity baseType) : EntityBase 1277public sealed class ModuleReferenceEntity(string name) : EntityBase 1282public sealed class MethodDefinitionEntity(TypeDefinitionEntity containingType, string name) : EntityBase, IHasHandle 1337public sealed class ParameterEntity(ParameterAttributes attributes, string? name, BlobBuilder marshallingDescriptor, int sequence) : EntityBase 1348public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 1381public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 1387public sealed class StandaloneSignatureEntity(BlobBuilder signature) : EntityBase 1392public sealed class DeclarativeSecurityAttributeEntity(DeclarativeSecurityAction action, BlobBuilder permissionSet) : EntityBase 1399public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 1406public sealed class MethodImplementationEntity(MethodDefinitionEntity methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 1412public sealed class FieldDefinitionEntity(FieldAttributes attributes, TypeDefinitionEntity type, string name, BlobBuilder signature) : EntityBase 1430public sealed class InterfaceImplementationEntity(TypeDefinitionEntity type, TypeEntity interfaceType) : EntityBase 1436public sealed class EventEntity(EventAttributes attributes, TypeEntity type, string name) : EntityBase 1445public sealed class PropertyEntity(PropertyAttributes attributes, BlobBuilder type, string name) : EntityBase 1456public sealed class FileEntity(string name) : EntityBase 1463public sealed class ModuleEntity : EntityBase 1468public abstract class AssemblyOrRefEntity(string name) : EntityBase 1488public sealed class ManifestResourceEntity(string name, uint offset) : EntityBase 1496public sealed class ExportedTypeEntity : EntityBase
101 references to EntityBase
ILAssembler (101)
EntityRegistry.cs (64)
17private readonly Dictionary<TableIndex, List<EntityBase>> _seenEntities = new(); 19private readonly Dictionary<(EntityBase ResolutionScope, string Namespace, string Name), TypeReferenceEntity> _seenTypeRefs = new(); 28private readonly Dictionary<(EntityBase, BlobBuilder), MethodSpecificationEntity> _seenMethodSpecs = new(new MethodSpecEqualityComparer()); 58private sealed class MethodSpecEqualityComparer : IEqualityComparer<(EntityBase, BlobBuilder)> 60public bool Equals((EntityBase, BlobBuilder) x, (EntityBase, BlobBuilder) y) 65public int GetHashCode((EntityBase, BlobBuilder) obj) 86public IReadOnlyList<EntityBase> GetSeenEntities(TableIndex table) 92return Array.Empty<EntityBase>(); 183EntityBase resolutionScope = type.ResolutionScope; 460static FieldDefinitionHandle GetFieldHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 463static MethodDefinitionHandle GetMethodHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 466static PropertyDefinitionHandle GetPropertyHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 469static EventDefinitionHandle GetEventHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 472static ParameterHandle GetParameterHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 475static EntityHandle GetHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex, TableIndex tokenType) 480foreach (var item in list) 491foreach (var item in otherList) 584public void RecordEntityInTable(TableIndex table, EntityBase entity) 586if (!_seenEntities.TryGetValue(table, out List<EntityBase>? entities)) 588_seenEntities[table] = entities = new List<EntityBase>(); 596where TEntity : EntityBase 610where TEntity : EntityBase 668public EntityBase ResolveHandleToEntity(EntityHandle entityHandle) 683public TypeReferenceEntity GetOrCreateTypeReference(EntityBase resolutionContext, TypeName name) 692EntityBase scope = resolutionContext; 1021public MethodSpecificationEntity GetOrCreateMethodSpecification(EntityBase method, BlobBuilder signature) 1027((EntityBase method, BlobBuilder signature) value) => new(method, signature), 1043public CustomAttributeEntity CreateCustomAttribute(EntityBase constructor, BlobBuilder value) 1099public ExportedTypeEntity GetOrCreateExportedType(EntityBase? implementation, string @namespace, string name, Action<ExportedTypeEntity> onCreateType) 1241public sealed class TypeReferenceEntity(EntityBase resolutionScope, string @namespace, string name) : TypeEntity, IHasReflectionNotation 1243public EntityBase ResolutionScope { get; } = resolutionScope; 1261public EntityBase? Owner { get; set; } 1348public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 1351public EntityBase Parent { get; private set; } = parent; 1381public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 1383public EntityBase Parent { get; } = parent; 1394public EntityBase? Parent { get; set; } 1399public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 1401public EntityBase? Owner { get; set; } 1402public EntityBase Constructor { get; } = constructor; 1442public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 1453public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 1493public EntityBase? Implementation { get; set; } 1498public ExportedTypeEntity(string name, string @namespace, EntityBase? implementation) 1508public EntityBase? Implementation { get; }
GrammarVisitor.cs (37)
118public sealed record Member(EntityRegistry.EntityBase Entity) : TypedefEntry; 119public sealed record CustomAttribute(EntityRegistry.EntityBase Constructor, BlobBuilder Value) : TypedefEntry; 148foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef)) 295foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef)) 322foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef)) 380foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef)) 1280EntityRegistry.EntityBase? resolutionContext = null; 1359EntityRegistry.EntityBase resolvedToken = VisitMdtoken(typeToken).Value; 1531var ctor = VisitCustomType(context.customType()).Value; 1560var ctor = VisitCustomType(context.customType()).Value; 1591public GrammarResult.Literal<EntityRegistry.EntityBase> VisitCustomType(CILParser.CustomTypeContext context) => VisitMethodRef(context.methodRef()); 2093public GrammarResult.Literal<(MethodSemanticsAttributes, EntityRegistry.EntityBase)?> VisitEventDecl(CILParser.EventDeclContext context) 2100EntityRegistry.EntityBase memberReference = VisitMethodRef(context.methodRef()).Value; 2113public GrammarResult.Sequence<(MethodSemanticsAttributes, EntityRegistry.EntityBase)> VisitEventDecls(CILParser.EventDeclsContext context) 2151public GrammarResult.Literal<(EntityRegistry.EntityBase? implementation, int typedefId, ImmutableArray<EntityRegistry.CustomAttributeEntity> attrs)> VisitExptypeDecls(CILParser.ExptypeDeclsContext context) 2157EntityRegistry.EntityBase? implementationEntity = null; 2173var entity = VisitMdtoken(mdToken).Value; 2224EntityRegistry.EntityBase? ResolveBetterEntity(EntityRegistry.EntityBase? newImplementation) 2582public GrammarResult.Literal<EntityRegistry.EntityBase> VisitFieldRef(CILParser.FieldRefContext context) 2588var resolved = TryResolveTypedefAsMember(alias); 2979var fieldRef = VisitFieldRef(context.fieldRef()).Value; 3016var methodRef = VisitMethodRef(context.methodRef()).Value; 3180var tok = VisitOwnerType(context.ownerType()).Value; 3454public GrammarResult.Literal<(EntityRegistry.EntityBase? implementation, uint offset, ImmutableArray<EntityRegistry.CustomAttributeEntity> attributes)> VisitManifestResDecls(CILParser.ManifestResDeclsContext context) 3456EntityRegistry.EntityBase? implementation = null; 3554public GrammarResult.Literal<EntityRegistry.EntityBase> VisitMdtoken(CILParser.MdtokenContext context) 3560public GrammarResult.Literal<EntityRegistry.EntityBase> VisitMemberRef(CILParser.MemberRefContext context) 4003public GrammarResult.Literal<EntityRegistry.EntityBase> VisitMethodRef(CILParser.MethodRefContext context) 4013var resolved = TryResolveTypedefAsMember(alias); 4418public GrammarResult.Literal<EntityRegistry.EntityBase> VisitOwnerType(CILParser.OwnerTypeContext context) 4525public GrammarResult.Literal<(MethodSemanticsAttributes, EntityRegistry.EntityBase)?> VisitPropDecl(CILParser.PropDeclContext context) 4532EntityRegistry.EntityBase memberReference = VisitMethodRef(context.methodRef()).Value; 4544public GrammarResult.Sequence<(MethodSemanticsAttributes, EntityRegistry.EntityBase)> VisitPropDecls(CILParser.PropDeclsContext context) 5197var member = VisitMemberRef(memberRef).Value; 5260private EntityRegistry.EntityBase? TryResolveTypedefAsMember(string alias) 5272private (EntityRegistry.EntityBase Constructor, BlobBuilder Value)? TryResolveTypedefAsCustomAttribute(string alias)