Show / Hide Table of Contents

Class HarmonyArgument

A Harmony annotation

Inheritance
object
Attribute
HarmonyArgument
Namespace: HarmonyLib
Assembly: 0Harmony.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Parameter, AllowMultiple = true)]
public class HarmonyArgument : Attribute

Constructors

HarmonyArgument(int)

An annotation to declare injected arguments by index

Declaration
public HarmonyArgument(int index)
Parameters
Type Name Description
int index

Zero-based index

HarmonyArgument(int, string)

An annotation to declare injected arguments by index and renaming them

Declaration
public HarmonyArgument(int index, string name)
Parameters
Type Name Description
int index

Zero-based index

string name

New name

HarmonyArgument(string)

An annotation to declare injected arguments by name

Declaration
public HarmonyArgument(string originalName)
Parameters
Type Name Description
string originalName

HarmonyArgument(string, string)

An annotation to declare injected arguments by renaming them

Declaration
public HarmonyArgument(string originalName, string newName)
Parameters
Type Name Description
string originalName

Name of the original argument

string newName

New name

Properties

Index

The index of the original argument

Declaration
public int Index { get; }
Property Value
Type Description
int

NewName

The new name of the original argument

Declaration
public string NewName { get; }
Property Value
Type Description
string

OriginalName

The name of the original argument

Declaration
public string OriginalName { get; }
Property Value
Type Description
string
In this article
Back to top Generated by DocFX