21 types derived from EntityBase
ILAssembler (21)
EntityRegistry.cs (21)
1781public abstract class TypeEntity : EntityBase 1949public sealed class GenericParameterEntity(GenericParameterAttributes attributes, string name) : EntityBase, INamed 1962public sealed class GenericParameterConstraintEntity(TypeEntity baseType) : EntityBase 1969public sealed class ModuleReferenceEntity(string name) : EntityBase 1974public sealed class MethodDefinitionEntity(TypeDefinitionEntity containingType, string name) : EntityBase, IHasHandle 2037public sealed class ParameterEntity(ParameterAttributes attributes, string? name, BlobBuilder marshallingDescriptor, int sequence) : EntityBase 2048public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 2081public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 2087public sealed class StandaloneSignatureEntity(BlobBuilder signature) : EntityBase 2092public sealed class DeclarativeSecurityAttributeEntity(DeclarativeSecurityAction action, BlobBuilder permissionSet) : EntityBase 2099public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 2112public sealed class MethodImplementationEntity(TypeDefinitionEntity type, EntityBase methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 2119public sealed class FieldDefinitionEntity(FieldAttributes attributes, TypeDefinitionEntity type, string name, BlobBuilder signature) : EntityBase 2138public sealed class InterfaceImplementationEntity(TypeDefinitionEntity type, TypeEntity interfaceType) : EntityBase 2144public sealed class EventEntity(EventAttributes attributes, TypeEntity? type, string name) : EntityBase 2153public sealed class PropertyEntity(PropertyAttributes attributes, BlobBuilder type, string name) : EntityBase 2164public sealed class FileEntity(string name) : EntityBase 2171public sealed class ModuleEntity : EntityBase 2176public abstract class AssemblyOrRefEntity(string name) : EntityBase 2196public sealed class ManifestResourceEntity(string name, uint offset) : EntityBase 2204public sealed class ExportedTypeEntity : EntityBase
123 references to EntityBase
ILAssembler (123)
Actions\GrammarActions.BuildImage.cs (1)
668foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef))
Actions\GrammarActions.Conversions.cs (1)
216private EntityRegistry.EntityBase? _pendingClassCustomAttributeOwner;
Actions\GrammarActions.CustomAttributes.Actions.cs (2)
170EntityRegistry.EntityBase constructor = MaterializeMethodReference(descriptor.Constructor); 226internal EntityRegistry.EntityBase MaterializeOwnerType(
Actions\GrammarActions.Declarations.Actions.cs (1)
131(EntityRegistry.EntityBase?)_lastFieldDefinition ?? _entityRegistry.Module;
Actions\GrammarActions.Instructions.cs (1)
377internal EntityRegistry.EntityBase ResolveMetadataToken(CILParser.MdtokenContext context)
Actions\GrammarActions.Instructions.References.cs (1)
96private static void WriteInstructionToken(CurrentMethodContext method, EntityRegistry.EntityBase entity)
Actions\GrammarActions.Manifest.ExportedTypes.cs (8)
97EntityRegistry.EntityBase? implementation, 130EntityRegistry.EntityBase? Implementation, 136EntityRegistry.EntityBase? implementation = null; 154EntityRegistry.EntityBase entity = ResolveMetadataToken(metadataToken.Token); 216private static EntityRegistry.EntityBase? ResolveBetterExportedTypeImplementation( 217EntityRegistry.EntityBase? current, 218EntityRegistry.EntityBase? candidate) 234static 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)
59EntityRegistry.EntityBase? owner = attribute.Owner; 109private EntityRegistry.EntityBase? TryResolveTypedefAsMember(string alias) 121EntityRegistry.EntityBase Constructor, 123EntityRegistry.EntityBase? Owner)?
Actions\GrammarActions.Members.Class.cs (1)
391EntityRegistry.EntityBase? owner)
Actions\GrammarActions.Members.Fields.cs (1)
164internal EntityRegistry.EntityBase MaterializeFieldReference(
Actions\GrammarActions.MethodBodies.Directives.cs (1)
344EntityRegistry.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 (68)
17private readonly Dictionary<TableIndex, List<EntityBase>> _seenEntities = new(); 19private readonly Dictionary<(EntityBase ResolutionScope, string Namespace, string Name), TypeReferenceEntity> _seenTypeRefs = new(); 29private readonly Dictionary<(EntityBase, BlobBuilder), MethodSpecificationEntity> _seenMethodSpecs = new(new MethodSpecEqualityComparer()); 72private sealed class MethodSpecEqualityComparer : IEqualityComparer<(EntityBase, BlobBuilder)> 74public bool Equals((EntityBase, BlobBuilder) x, (EntityBase, BlobBuilder) y) 79public int GetHashCode((EntityBase, BlobBuilder) obj) 100public IReadOnlyList<EntityBase> GetSeenEntities(TableIndex table) 106return Array.Empty<EntityBase>(); 268EntityBase scope => scope.Handle 665static FieldDefinitionHandle GetFieldHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 668static MethodDefinitionHandle GetMethodHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 671static PropertyDefinitionHandle GetPropertyHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 674static EventDefinitionHandle GetEventHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 677static ParameterHandle GetParameterHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 680static EntityHandle GetHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex, TableIndex tokenType) 685foreach (var item in list) 696foreach (var item in otherList) 794public void RecordEntityInTable(TableIndex table, EntityBase entity) 796if (!_seenEntities.TryGetValue(table, out List<EntityBase>? entities)) 798_seenEntities[table] = entities = new List<EntityBase>(); 806where TEntity : EntityBase 820where TEntity : EntityBase 906public EntityBase ResolveHandleToEntity(EntityHandle entityHandle) 921public TypeReferenceEntity GetOrCreateTypeReference(EntityBase resolutionContext, TypeName name) 952EntityBase scope = resolutionContext; 1258EntityBase resolutionScope = typeRef.ResolutionScope; 1642public MethodSpecificationEntity GetOrCreateMethodSpecification(EntityBase method, BlobBuilder signature) 1648((EntityBase method, BlobBuilder signature) value) => new(method, signature), 1664public CustomAttributeEntity CreateCustomAttribute(EntityBase constructor, BlobBuilder value) 1682if (toRemove.Count == 0 || !_seenEntities.TryGetValue(TableIndex.CustomAttribute, out List<EntityBase>? entities)) 1750public ExportedTypeEntity GetOrCreateExportedType(EntityBase? implementation, string @namespace, string name, Action<ExportedTypeEntity> onCreateType) 1894public sealed class TypeReferenceEntity(EntityBase resolutionScope, string @namespace, string name) : TypeEntity, IHasReflectionNotation 1896public EntityBase ResolutionScope { get; } = resolutionScope; 1953public EntityBase? Owner { get; set; } 2048public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 2051public EntityBase Parent { get; private set; } = parent; 2081public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 2083public EntityBase Parent { get; } = parent; 2094public EntityBase? Parent { get; set; } 2099public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 2101public EntityBase? Owner { get; set; } 2102public EntityBase Constructor { get; } = constructor; 2112public sealed class MethodImplementationEntity(TypeDefinitionEntity type, EntityBase methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 2115public EntityBase MethodBody { get; } = methodBody; 2150public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 2161public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 2201public EntityBase? Implementation { get; set; } 2206public ExportedTypeEntity(string name, string @namespace, EntityBase? implementation) 2216public 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) 107EntityRegistry.EntityBase? declaringType) => declaringType switch 114private static KnownAttribute? TryFindKnownAttribute(EntityRegistry.EntityBase constructor, string @namespace, string name) 140private 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,