Class HarmonyArgument
A Harmony annotation
Inheritance
System.Object
System.Attribute
HarmonyArgument
Namespace: HarmonyLib
Assembly: 0Harmony.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Parameter, AllowMultiple = true)]
public class HarmonyArgument : Attribute, _Attribute
Constructors
| Improve this Doc View SourceHarmonyArgument(Int32)
An annotation to declare injected arguments by index
Declaration
public HarmonyArgument(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | 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
Type | Name | Description |
---|---|---|
System.Int32 | index | Zero-based index |
System.String | name | New name |
HarmonyArgument(String)
An annotation to declare injected arguments by name
Declaration
public HarmonyArgument(string originalName)
Parameters
Type | Name | Description |
---|---|---|
System.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 |
---|---|---|
System.String | originalName | Name of the original argument |
System.String | newName | New name |
Properties
| Improve this Doc View SourceIndex
The index of the original argument
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
NewName
The new name of the original argument
Declaration
public string NewName { get; }
Property Value
Type | Description |
---|---|
System.String |
OriginalName
The name of the original argument
Declaration
public string OriginalName { get; }
Property Value
Type | Description |
---|---|
System.String |