Class HarmonyArgument
- Namespace
- HarmonyLib
- Assembly
- 0Harmony.dll
A Harmony annotation
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Parameter, AllowMultiple = true)]
public class HarmonyArgument : Attribute
- Inheritance
-
objectAttributeHarmonyArgument
Constructors
HarmonyArgument(int)
An annotation to declare injected arguments by index
public HarmonyArgument(int index)
Parameters
indexintZero-based index
HarmonyArgument(int, string)
An annotation to declare injected arguments by index and renaming them
public HarmonyArgument(int index, string name)
Parameters
indexintZero-based index
namestringNew name
HarmonyArgument(string)
An annotation to declare injected arguments by name
public HarmonyArgument(string originalName)
Parameters
originalNamestring
HarmonyArgument(string, ArgumentMode)
Binds an argument using the selected name handling
public HarmonyArgument(string originalName, ArgumentMode mode)
Parameters
originalNamestringName of the original argument
modeArgumentModeHow Harmony resolves the argument name
HarmonyArgument(string, string)
An annotation to declare injected arguments by renaming them
public HarmonyArgument(string originalName, string newName)
Parameters
originalNamestringName of the original argument
newNamestringNew name
Properties
Index
The index of the original argument
public int Index { get; }
Property Value
- int
NewName
The new name of the original argument
public string NewName { get; }
Property Value
- string
OriginalName
The name of the original argument
public string OriginalName { get; }
Property Value
- string