Back to Harmony

Class HarmonyArgument

docs/api/HarmonyLib.HarmonyArgument.html

2.4.2.02.2 KB
Original Source

Class HarmonyArgument

A Harmony annotation

Inheritance

System.Object

System.Attribute

HarmonyArgument

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

Constructors

HarmonyArgument(Int32)

An annotation to declare injected arguments by index

Declaration
public HarmonyArgument(int index)
Parameters
TypeNameDescription
System.Int32index

Zero-based index

|

HarmonyArgument(Int32, String)

An annotation to declare injected arguments by index and renaming them

Declaration
public HarmonyArgument(int index, string name)
Parameters
TypeNameDescription
System.Int32index

Zero-based index

| | System.String | name |

New name

|

HarmonyArgument(String)

An annotation to declare injected arguments by name

Declaration
public HarmonyArgument(string originalName)
Parameters
TypeNameDescription
System.StringoriginalName

HarmonyArgument(String, String)

An annotation to declare injected arguments by renaming them

Declaration
public HarmonyArgument(string originalName, string newName)
Parameters
TypeNameDescription
System.StringoriginalName

Name of the original argument

| | System.String | newName |

New name

|

Properties

Index

The index of the original argument

Declaration
public int Index { get; }
Property Value
TypeDescription
System.Int32

NewName

The new name of the original argument

Declaration
public string NewName { get; }
Property Value
TypeDescription
System.String

OriginalName

The name of the original argument

Declaration
public string OriginalName { get; }
Property Value
TypeDescription
System.String