Browse documentation

Class InlineSignature

Namespace
HarmonyLib
Assembly
0Harmony.dll

A mutable signature used as the operand of a calli instruction. Parameter and return entries are System.Type, nested InlineSignature, or InlineSignature.ModifierType objects.

public class InlineSignature
Inheritance
object
InlineSignature

Constructors

InlineSignature()

public InlineSignature()

Properties

CallingConvention

The calling convention. System.Runtime.InteropServices.CallingConvention.Winapi means default managed, not default unmanaged. Other named values mean their unmanaged conventions; other metadata conventions use their numeric value plus one.

public CallingConvention CallingConvention { get; set; }

Property Value

CallingConvention

Remarks

Preserve this historical encoding when re-emitting an operand. For new unmanaged calls, specify the actual convention, such as Cdecl or StdCall.

ExplicitThis

Whether the first entry in Parameters explicitly describes the instance. Requires HasThis.

public bool ExplicitThis { get; set; }

Property Value

bool

HasThis

Whether the call receives an instance. Unless ExplicitThis is set, the instance is not listed in Parameters.

public bool HasThis { get; set; }

Property Value

bool

Parameters

The parameter types or function-pointer signatures

public List<object> Parameters { get; set; }

Property Value

List<object>

PopCount

Stack values consumed by calli, including the function pointer and any implicit instance.

public int PopCount { get; }

Property Value

int

Remarks

An explicit instance is counted once, through Parameters.

PushCount

Stack values produced by calli: zero for void, otherwise one.

public int PushCount { get; }

Property Value

int

Remarks

Modifiers do not change the count. A function-pointer return counts as one pointer, regardless of its signature.

ReturnType

The return type or function-pointer signature

public object ReturnType { get; set; }

Property Value

object

Methods

ToString()

Returns a string representation of the inline signature

public override string ToString()

Returns

string

A string representation of the inline signature

Harmony 3 preview

For the stable release, read the 2.x documentation.