Table of Contents

Class MethodSignatureBase

Namespace
AsmResolver.DotNet.Signatures
Assembly
AsmResolver.DotNet.dll

Provides a base for method and property signatures.

public abstract class MethodSignatureBase : MemberSignature, IImportable
Inheritance
MethodSignatureBase
Implements
Derived
Inherited Members

Constructors

MethodSignatureBase(CallingConventionAttributes, TypeSignature, IEnumerable<TypeSignature>?)

Initializes the base of a method signature.

protected MethodSignatureBase(CallingConventionAttributes attributes, TypeSignature memberReturnType, IEnumerable<TypeSignature>? parameterTypes)

Parameters

attributes CallingConventionAttributes

The attributes associated to the signature.

memberReturnType TypeSignature

The return type of the member.

parameterTypes IEnumerable<TypeSignature>

The types of all (non-sentinel) parameters.

Properties

HasParameterTypes

Gets a value indicating whether there are any fixed parameters present in this signature.

public bool HasParameterTypes { get; }

Property Value

bool

ParameterTypes

Gets an ordered list of types indicating the types of the parameters that this member defines.

public IList<TypeSignature> ParameterTypes { get; protected set; }

Property Value

IList<TypeSignature>

ReturnType

Gets or sets the type of the value that this member returns.

public TypeSignature ReturnType { get; set; }

Property Value

TypeSignature

ReturnsValue

Gets value indicating if method returns value or not.

public bool ReturnsValue { get; }

Property Value

bool

Methods

GetTotalParameterCount()

Determines the total number of parameters that this method requires to be invoked.

public virtual int GetTotalParameterCount()

Returns

int

The number of parameters

Remarks

This number includes the this parameter, as well as any potential sentinel parameters.

IsImportedInModule(ModuleDefinition)

Determines whether the descriptor of the member is fully imported in the provided module.

public override bool IsImportedInModule(ModuleDefinition module)

Parameters

module ModuleDefinition

The module that is supposed to import the member.

Returns

bool

true if the descriptor of the member is fully imported by the module, false otherwise.

Remarks

This method verifies all references in the descriptor of the member only. It does not verify any additional data or contents (such as a method body) associated to the member.