Table of Contents

Class VarArgInstanceMethod

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

Used when calling a vararg method. Stores the actual parameter types being passed.

public class VarArgInstanceMethod : IMethod, IParameterizedMember, IMember, IEntity, ISymbol, ICompilationProvider, INamedElement
Inheritance
VarArgInstanceMethod
Implements
Inherited Members
Extension Methods

Constructors

VarArgInstanceMethod(IMethod, IEnumerable<IType>)

public VarArgInstanceMethod(IMethod baseMethod, IEnumerable<IType> varArgTypes)

Parameters

baseMethod IMethod
varArgTypes IEnumerable<IType>

Properties

Accessibility

Gets the accessibility of this entity.

public Accessibility Accessibility { get; }

Property Value

Accessibility

AccessorKind

Gets the kind of accessor this is.

public MethodSemanticsAttributes AccessorKind { get; }

Property Value

MethodSemanticsAttributes

AccessorOwner

If this method is an accessor, returns the corresponding property/event. Otherwise, returns null.

public IMember AccessorOwner { get; }

Property Value

IMember

BaseMethod

public IMethod BaseMethod { get; }

Property Value

IMethod

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

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

bool

IsAbstract

public bool IsAbstract { get; }

Property Value

bool

IsAccessor

Gets whether the method is a property/event accessor.

public bool IsAccessor { get; }

Property Value

bool

IsConstructor

public bool IsConstructor { get; }

Property Value

bool

IsDestructor

public bool IsDestructor { get; }

Property Value

bool

IsExplicitInterfaceImplementation

Gets whether this member is explicitly implementing an interface.

public bool IsExplicitInterfaceImplementation { get; }

Property Value

bool

IsExtensionMethod

public bool IsExtensionMethod { get; }

Property Value

bool

IsOperator

public bool IsOperator { 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

Parameters

public IReadOnlyList<IParameter> Parameters { get; }

Property Value

IReadOnlyList<IParameter>

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

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

IMethod

ReflectionName

public string ReflectionName { get; }

Property Value

string

RegularParameterCount

public int RegularParameterCount { get; }

Property Value

int

ReturnType

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

public IType ReturnType { get; }

Property Value

IType

Substitution

Gets the substitution belonging to this specialized member. Returns TypeParameterSubstitution.Identity for not specialized members.

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

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

IReadOnlyList<IType>

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

IReadOnlyList<ITypeParameter>

Methods

Equals(IMember, TypeVisitor)

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

public 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 method with the given substitution. If this method is already specialized, the new substitution is composed with the existing substition.

public IMethod Specialize(TypeParameterSubstitution substitution)

Parameters

substitution TypeParameterSubstitution

Returns

IMethod

ToString()

public override string ToString()

Returns

string