docs/api/HarmonyLib.HarmonyArgument.html
A Harmony annotation
System.Object
System.Attribute
HarmonyArgument
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Parameter, AllowMultiple = true)]
public class HarmonyArgument : Attribute, _Attribute
An annotation to declare injected arguments by index
public HarmonyArgument(int index)
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Zero-based index
|
An annotation to declare injected arguments by index and renaming them
public HarmonyArgument(int index, string name)
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Zero-based index
| | System.String | name |
New name
|
An annotation to declare injected arguments by name
public HarmonyArgument(string originalName)
| Type | Name | Description |
|---|---|---|
| System.String | originalName |
An annotation to declare injected arguments by renaming them
public HarmonyArgument(string originalName, string newName)
| Type | Name | Description |
|---|---|---|
| System.String | originalName |
Name of the original argument
| | System.String | newName |
New name
|
The index of the original argument
public int Index { get; }
| Type | Description |
|---|---|
| System.Int32 |
The new name of the original argument
public string NewName { get; }
| Type | Description |
|---|---|
| System.String |
The name of the original argument
public string OriginalName { get; }
| Type | Description |
|---|---|
| System.String |