Show / Hide Table of Contents

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 Source

HarmonyArgument(Int32)

An annotation to declare injected arguments by index

Declaration
public HarmonyArgument(int index)
Parameters
Type Name Description
System.Int32 index

Zero-based index

| Improve this Doc View Source

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

| Improve this Doc View Source

HarmonyArgument(String)

An annotation to declare injected arguments by name

Declaration
public HarmonyArgument(string originalName)
Parameters
Type Name Description
System.String originalName
| Improve this Doc View Source

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 Source

Index

The index of the original argument

Declaration
public int Index { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NewName

The new name of the original argument

Declaration
public string NewName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

OriginalName

The name of the original argument

Declaration
public string OriginalName { get; }
Property Value
Type Description
System.String
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX