Table of Contents

Class SpecializedMember

Namespace
ICSharpCode.Decompiler.TypeSystem.Implementation
Assembly
ICSharpCode.Decompiler.dll

Represents a SpecializedMember (a member on which type substitution has been performed).

public abstract class SpecializedMember : IMember, IEntity, ISymbol, ICompilationProvider, INamedElement
Inheritance
SpecializedMember
Implements
Derived
Inherited Members
Extension Methods

Constructors

SpecializedMember(IMember)

protected SpecializedMember(IMember memberDefinition)

Parameters

memberDefinition IMember

Fields

baseMember

protected readonly IMember baseMember

Field Value

IMember

Properties

Accessibility

Gets the accessibility of this entity.

public Accessibility Accessibility { get; }

Property Value

Accessibility

Compilation

Gets the parent compilation. This property never returns null.

public ICompilation Compilation { get; }

Property Value

ICompilation

DeclaringType

Gets/Sets the declaring type (incl. type arguments, if any). If this is not a specialized member, the value returned is equal to DeclaringTypeDefinition.

public IType DeclaringType { get; }

Property Value

IType

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.

public ITypeDefinition DeclaringTypeDefinition { get; }

Property Value

ITypeDefinition

ExplicitlyImplementedInterfaceMembers

public IEnumerable<IMember> ExplicitlyImplementedInterfaceMembers { get; }

Property Value

IEnumerable<IMember>

FullName

public string FullName { get; }

Property Value

string

IsAbstract

public bool IsAbstract { get; }

Property Value

bool

IsExplicitInterfaceImplementation

Gets whether this member is explicitly implementing an interface.

public bool IsExplicitInterfaceImplementation { get; }

Property Value

bool

IsOverridable

Gets if the member can be overridden. Returns true when the member is "abstract", "virtual" or "override" but not "sealed".

public bool IsOverridable { get; }

Property Value

bool

IsOverride

Gets whether this member is overriding another member.

public bool IsOverride { get; }

Property Value

bool

IsSealed

public bool IsSealed { get; }

Property Value

bool

IsStatic

Gets whether this entity is static. Returns true if either the 'static' or the 'const' modifier is set.

public bool IsStatic { get; }

Property Value

bool

IsVirtual

Gets if the member is virtual. Is true only if the "virtual" modifier was used, but non-virtual members can be overridden, too; if they are abstract or overriding a method.

public bool IsVirtual { get; }

Property Value

bool

MemberDefinition

Gets the original member definition for this member. Returns this if this is not a specialized member. Specialized members are the result of overload resolution with type substitution.

public IMember MemberDefinition { get; }

Property Value

IMember

MetadataToken

public EntityHandle MetadataToken { get; }

Property Value

EntityHandle

Name

Gets the short name of the entity.

public string Name { get; }

Property Value

string

Namespace

Gets the full name of the namespace containing this entity.

public string Namespace { get; }

Property Value

string

ParentModule

The module in which this entity is defined. May return null, if the IEntity was not created from a module.

public IModule ParentModule { get; }

Property Value

IModule

ReflectionName

public string ReflectionName { get; }

Property Value

string

ReturnType

Gets the return type of this member. This property never returns null.

public IType ReturnType { get; protected set; }

Property Value

IType

Substitution

Gets the substitution belonging to this specialized member.

public TypeParameterSubstitution Substitution { get; }

Property Value

TypeParameterSubstitution

SymbolKind

This property returns an enum specifying which kind of symbol this is (which derived interfaces of ISymbol are implemented)

public SymbolKind SymbolKind { get; }

Property Value

SymbolKind

Methods

AddSubstitution(TypeParameterSubstitution)

Performs a substitution. This method may only be called by constructors in derived classes.

protected void AddSubstitution(TypeParameterSubstitution newSubstitution)

Parameters

newSubstitution TypeParameterSubstitution

Equals(IMember, TypeVisitor)

Gets whether the members are considered equal when applying the specified type normalization.

public virtual bool Equals(IMember obj, TypeVisitor typeNormalization)

Parameters

obj IMember
typeNormalization TypeVisitor

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Specialize(TypeParameterSubstitution)

Specializes this member with the given substitution. If this member is already specialized, the new substitution is composed with the existing substition.

public virtual IMember Specialize(TypeParameterSubstitution newSubstitution)

Parameters

newSubstitution TypeParameterSubstitution

Returns

IMember

ToString()

public override string ToString()

Returns

string