Class SpecializedMethod
- Namespace
- ICSharpCode.Decompiler.TypeSystem.Implementation
- Assembly
- ICSharpCode.Decompiler.dll
Represents a specialized IMethod (e.g. after type substitution).
public class SpecializedMethod : SpecializedParameterizedMember, IMethod, IParameterizedMember, IMember, IEntity, ISymbol, ICompilationProvider, INamedElement
- Inheritance
-
SpecializedMethod
- Implements
- Inherited Members
- Extension Methods
Constructors
SpecializedMethod(IMethod, TypeParameterSubstitution)
public SpecializedMethod(IMethod methodDefinition, TypeParameterSubstitution substitution)
Parameters
methodDefinition
IMethodsubstitution
TypeParameterSubstitution
Properties
AccessorKind
Gets the kind of accessor this is.
public MethodSemanticsAttributes AccessorKind { get; }
Property Value
AccessorOwner
If this method is an accessor, returns the corresponding property/event. Otherwise, returns null.
public IMember AccessorOwner { get; }
Property Value
HasBody
Gets whether the method has a body.
This property returns false
for abstract
or extern
methods,
or for partial
methods without implementation.
public bool HasBody { get; }
Property Value
IsAccessor
Gets whether the method is a property/event accessor.
public bool IsAccessor { get; }
Property Value
IsConstructor
public bool IsConstructor { get; }
Property Value
IsDestructor
public bool IsDestructor { get; }
Property Value
IsExtensionMethod
public bool IsExtensionMethod { get; }
Property Value
IsLocalFunction
public bool IsLocalFunction { get; }
Property Value
IsOperator
public bool IsOperator { get; }
Property Value
ReducedFrom
If this method is reduced from an extension method or a local function returns the original method, null
otherwise.
A reduced method doesn't contain the extension method parameter. That means that it has one parameter less than its definition.
A local function doesn't contain compiler-generated method parameters at the end.
public IMethod ReducedFrom { get; }
Property Value
ReturnTypeIsRefReadOnly
Gets whether the return type is 'ref readonly'.
public bool ReturnTypeIsRefReadOnly { get; }
Property Value
TypeArguments
Gets the type arguments passed to this method.
If the method is generic but not parameterized yet, this property returns the type parameters,
as if the method was parameterized with its own type arguments (void M<T>() { M<T>(); }
).
public IReadOnlyList<IType> TypeArguments { get; }
Property Value
TypeParameters
Gets the type parameters of this method; or an empty list if the method is not generic.
public IReadOnlyList<ITypeParameter> TypeParameters { get; }
Property Value
Methods
Equals(IMember, TypeVisitor)
Gets whether the members are considered equal when applying the specified type normalization.
public override bool Equals(IMember obj, TypeVisitor typeNormalization)
Parameters
obj
IMembertypeNormalization
TypeVisitor
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetReturnTypeAttributes()
public IEnumerable<IAttribute> GetReturnTypeAttributes()
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.
public override IMember Specialize(TypeParameterSubstitution newSubstitution)
Parameters
newSubstitution
TypeParameterSubstitution
Returns
ToString()
public override string ToString()