Interface IMember
- Namespace
- ICSharpCode.Decompiler.TypeSystem
- Assembly
- ICSharpCode.Decompiler.dll
Method/field/property/event.
public interface IMember : IEntity, ISymbol, ICompilationProvider, INamedElement
- Inherited Members
- Extension Methods
Properties
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.
IType DeclaringType { get; }
Property Value
ExplicitlyImplementedInterfaceMembers
Gets the interface members explicitly implemented by this member.
IEnumerable<IMember> ExplicitlyImplementedInterfaceMembers { get; }
Property Value
Remarks
For methods, equivalent to ( from impl in DeclaringTypeDefinition.GetExplicitInterfaceImplementations() where impl.Implementation == this select impl.InterfaceMethod ), but may be more efficient than searching the whole list.
Note that it is possible for a class to implement an interface using members in a base class unrelated to that interface: class BaseClass { public void Dispose() {} } class C : BaseClass, IDisposable { } In this case, the interface member will not show up in (BaseClass.Dispose).ImplementedInterfaceMembers, so use (C).GetInterfaceImplementations() instead to handle this case.
IsExplicitInterfaceImplementation
Gets whether this member is explicitly implementing an interface.
bool IsExplicitInterfaceImplementation { get; }
Property Value
IsOverridable
Gets if the member can be overridden. Returns true when the member is "abstract", "virtual" or "override" but not "sealed".
bool IsOverridable { get; }
Property Value
IsOverride
Gets whether this member is overriding another member.
bool IsOverride { get; }
Property Value
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.
bool IsVirtual { get; }
Property Value
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.
IMember MemberDefinition { get; }
Property Value
ReturnType
Gets the return type of this member.
This property never returns null
.
IType ReturnType { get; }
Property Value
Substitution
Gets the substitution belonging to this specialized member. Returns TypeParameterSubstitution.Identity for not specialized members.
TypeParameterSubstitution Substitution { get; }
Property Value
Methods
Equals(IMember?, TypeVisitor)
Gets whether the members are considered equal when applying the specified type normalization.
bool Equals(IMember? obj, TypeVisitor typeNormalization)
Parameters
obj
IMembertypeNormalization
TypeVisitor
Returns
Specialize(TypeParameterSubstitution)
Specializes this member with the given substitution. If this member is already specialized, the new substitution is composed with the existing substition.
IMember Specialize(TypeParameterSubstitution substitution)
Parameters
substitution
TypeParameterSubstitution