Interface IEntity
- Namespace
- ICSharpCode.Decompiler.TypeSystem
- Assembly
- ICSharpCode.Decompiler.dll
Represents a resolved entity.
public interface IEntity : ISymbol, ICompilationProvider, INamedElement
- Inherited Members
- Extension Methods
Properties
Accessibility
Gets the accessibility of this entity.
Accessibility Accessibility { get; }
Property Value
DeclaringType
Gets/Sets the declaring type (incl. type arguments, if any). This property will return null for top-level entities. If this is not a specialized member, the value returned is equal to DeclaringTypeDefinition.
IType? DeclaringType { get; }
Property Value
DeclaringTypeDefinition
Gets the declaring class. For members, this is the class that contains the member. For nested classes, this is the outer class. For top-level entities, this property returns null.
ITypeDefinition? DeclaringTypeDefinition { get; }
Property Value
IsAbstract
Returns whether this entity is abstract.
bool IsAbstract { get; }
Property Value
Remarks
Static classes also count as abstract classes.
IsSealed
Returns whether this entity is sealed.
bool IsSealed { get; }
Property Value
Remarks
Static classes also count as sealed classes.
IsStatic
Gets whether this entity is static. Returns true if either the 'static' or the 'const' modifier is set.
bool IsStatic { get; }
Property Value
MetadataToken
Gets the metadata token for this entity.
EntityHandle MetadataToken { get; }
Property Value
Remarks
The token is only valid within the context of the assembly defining this entity. Token may be 0 if this is a generated member. Note: specialized members will return the token of the member definition.
Name
Gets the short name of the entity.
string Name { get; }
Property Value
ParentModule
The module in which this entity is defined. May return null, if the IEntity was not created from a module.
IModule? ParentModule { get; }
Property Value
Methods
GetAttribute(KnownAttribute)
IAttribute? GetAttribute(KnownAttribute attribute)
Parameters
attribute
KnownAttribute
Returns
GetAttributes()
Gets the attributes on this entity. Does not include inherited attributes.
IEnumerable<IAttribute> GetAttributes()
Returns
HasAttribute(KnownAttribute)
bool HasAttribute(KnownAttribute attribute)
Parameters
attribute
KnownAttribute