Table of Contents

Class CallingConventionSignature

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

Provides a base for all signature that deal with a calling convention. This includes most member signatures, such as method and field signatures.

public abstract class CallingConventionSignature : ExtendableBlobSignature, IImportable
Inheritance
CallingConventionSignature
Implements
Derived
Inherited Members

Constructors

CallingConventionSignature(CallingConventionAttributes)

Creates a new calling convention signature.

protected CallingConventionSignature(CallingConventionAttributes attributes)

Parameters

attributes CallingConventionAttributes

The attributes associated to the signature.

Properties

Attributes

Gets or sets the attributes of the signature.

public CallingConventionAttributes Attributes { get; set; }

Property Value

CallingConventionAttributes

CallingConvention

When this signature references a method signature, gets or sets the calling convention that is used.

public CallingConventionAttributes CallingConvention { get; set; }

Property Value

CallingConventionAttributes

ExplicitThis

Gets or sets a value indicating whether the this parameter is explicitly specified in the parameter list. That is, determines whether the first parameter is used for the current instance object.

public bool ExplicitThis { get; set; }

Property Value

bool

HasThis

Gets or sets a value indicating whether the member is an instance member and an additional argument is required to use this member.

public bool HasThis { get; set; }

Property Value

bool

IsField

Gets a value indicating whether the signature describes a field

public bool IsField { get; }

Property Value

bool

IsGeneric

Gets or sets a value indicating whether the member using this signature is a generic member and defines generic parameters.

public bool IsGeneric { get; set; }

Property Value

bool

IsGenericInstance

Gets a value indicating whether the signature describes a generic instance of a method.

public bool IsGenericInstance { get; }

Property Value

bool

IsLocal

Gets a value indicating whether the signature describes a local variable.

public bool IsLocal { get; }

Property Value

bool

IsMethod

Gets a value indicating whether the signature describes a method.

public bool IsMethod { get; }

Property Value

bool

Methods

FromReader(ref BlobReaderContext, ref BinaryStreamReader, bool)

Reads a single calling convention signature at the current position of the provided stream reader.

public static CallingConventionSignature? FromReader(ref BlobReaderContext context, ref BinaryStreamReader reader, bool readToEnd = true)

Parameters

context BlobReaderContext

The blob reader context.

reader BinaryStreamReader

The reader to use.

readToEnd bool

Determines whether any extra data after the signature should be read and put into the ExtraData property.

Returns

CallingConventionSignature

The read signature.

ImportWithInternal(ReferenceImporter)

Imports the signature using the provided reference importer object.

protected abstract CallingConventionSignature ImportWithInternal(ReferenceImporter importer)

Parameters

importer ReferenceImporter

The reference importer to us.

Returns

CallingConventionSignature

The imported signature.

IsImportedInModule(ModuleDefinition)

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

public abstract 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.