21 types derived from EntityBase
ILAssembler (21)
EntityRegistry.cs (21)
1791public abstract class TypeEntity : EntityBase 1960public sealed class GenericParameterEntity(GenericParameterAttributes attributes, string name) : EntityBase, INamed 1973public sealed class GenericParameterConstraintEntity(TypeEntity baseType) : EntityBase 1980public sealed class ModuleReferenceEntity(string name) : EntityBase 1985public sealed class MethodDefinitionEntity(TypeDefinitionEntity containingType, string name) : EntityBase, IHasHandle 2054public sealed class ParameterEntity(ParameterAttributes attributes, string? name, BlobBuilder marshallingDescriptor, int sequence) : EntityBase 2065public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 2098public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 2104public sealed class StandaloneSignatureEntity(BlobBuilder signature) : EntityBase 2109public sealed class DeclarativeSecurityAttributeEntity(DeclarativeSecurityAction action, BlobBuilder permissionSet) : EntityBase 2116public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 2129public sealed class MethodImplementationEntity(TypeDefinitionEntity type, EntityBase methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 2136public sealed class FieldDefinitionEntity(FieldAttributes attributes, TypeDefinitionEntity type, string name, BlobBuilder signature) : EntityBase 2155public sealed class InterfaceImplementationEntity(TypeDefinitionEntity type, TypeEntity interfaceType) : EntityBase 2161public sealed class EventEntity(EventAttributes attributes, TypeEntity? type, string name) : EntityBase 2170public sealed class PropertyEntity(PropertyAttributes attributes, BlobBuilder type, string name) : EntityBase 2181public sealed class FileEntity(string name) : EntityBase 2188public sealed class ModuleEntity : EntityBase 2193public abstract class AssemblyOrRefEntity(string name) : EntityBase 2213public sealed class ManifestResourceEntity(string name, uint offset) : EntityBase 2221public sealed class ExportedTypeEntity : EntityBase
124 references to EntityBase
ILAssembler (124)
Actions\GrammarActions.BuildImage.cs (2)
694foreach (var entity in _entityRegistry.GetSeenEntities(TableIndex.MethodDef)) 1005customAttr.Owner = (EntityRegistry.EntityBase?)_entityRegistry.Assembly
Actions\GrammarActions.Conversions.cs (1)
244private 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)
410internal 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)
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 (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) 101public IReadOnlyList<EntityBase> GetSeenEntities(TableIndex table) 107return Array.Empty<EntityBase>(); 269EntityBase scope => scope.Handle 670static FieldDefinitionHandle GetFieldHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 673static MethodDefinitionHandle GetMethodHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 676static PropertyDefinitionHandle GetPropertyHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 679static EventDefinitionHandle GetEventHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 682static ParameterHandle GetParameterHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 685static EntityHandle GetHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex, TableIndex tokenType) 690foreach (var item in list) 701foreach (var item in otherList) 799public void RecordEntityInTable(TableIndex table, EntityBase entity) 801if (!_seenEntities.TryGetValue(table, out List<EntityBase>? entities)) 803_seenEntities[table] = entities = new List<EntityBase>(); 811where TEntity : EntityBase 825where TEntity : EntityBase 911public EntityBase ResolveHandleToEntity(EntityHandle entityHandle) 926public TypeReferenceEntity GetOrCreateTypeReference(EntityBase resolutionContext, TypeName name) 957EntityBase scope = resolutionContext; 1268EntityBase resolutionScope = typeRef.ResolutionScope; 1652public MethodSpecificationEntity GetOrCreateMethodSpecification(EntityBase method, BlobBuilder signature) 1658((EntityBase method, BlobBuilder signature) value) => new(method, signature), 1674public CustomAttributeEntity CreateCustomAttribute(EntityBase constructor, BlobBuilder value) 1692if (toRemove.Count == 0 || !_seenEntities.TryGetValue(TableIndex.CustomAttribute, out List<EntityBase>? entities)) 1760public ExportedTypeEntity GetOrCreateExportedType(EntityBase? implementation, string @namespace, string name, Action<ExportedTypeEntity> onCreateType) 1905public sealed class TypeReferenceEntity(EntityBase resolutionScope, string @namespace, string name) : TypeEntity, IHasReflectionNotation 1907public EntityBase ResolutionScope { get; } = resolutionScope; 1964public EntityBase? Owner { get; set; } 2065public sealed class MemberReferenceEntity(EntityBase parent, string name, BlobBuilder signature) : EntityBase 2068public EntityBase Parent { get; private set; } = parent; 2098public sealed class MethodSpecificationEntity(EntityBase parent, BlobBuilder signature) : EntityBase 2100public EntityBase Parent { get; } = parent; 2111public EntityBase? Parent { get; set; } 2116public sealed class CustomAttributeEntity(EntityBase constructor, BlobBuilder value) : EntityBase 2118public EntityBase? Owner { get; set; } 2119public EntityBase Constructor { get; } = constructor; 2129public sealed class MethodImplementationEntity(TypeDefinitionEntity type, EntityBase methodBody, MemberReferenceEntity methodDeclaration) : EntityBase 2132public EntityBase MethodBody { get; } = methodBody; 2167public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 2178public List<(MethodSemanticsAttributes Semantic, EntityBase Method)> Accessors { get; } = new(); 2218public EntityBase? Implementation { get; set; } 2223public ExportedTypeEntity(string name, string @namespace, EntityBase? implementation) 2233public 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,