Show / Hide Table of Contents

Class HarmonyDelegate

Annotation to define the original method for delegate injection

Inheritance
object
Attribute
HarmonyAttribute
HarmonyPatch
HarmonyDelegate
Inherited Members
HarmonyAttribute.info
Namespace: HarmonyLib
Assembly: 0Harmony.dll
Syntax
[AttributeUsage(AttributeTargets.Delegate, AllowMultiple = true)]
public class HarmonyDelegate : HarmonyPatch

Constructors

HarmonyDelegate(MethodDispatchType)

An annotation that specifies call dispatching mechanics for the delegate

Declaration
public HarmonyDelegate(MethodDispatchType methodDispatchType)
Parameters
Type Name Description
MethodDispatchType methodDispatchType

The MethodDispatchType

HarmonyDelegate(MethodDispatchType, params Type[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(MethodDispatchType methodDispatchType, params Type[] argumentTypes)
Parameters
Type Name Description
MethodDispatchType methodDispatchType

The MethodDispatchType

Type[] argumentTypes

An array of argument types to target overloads

HarmonyDelegate(MethodDispatchType, Type[], ArgumentType[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(MethodDispatchType methodDispatchType, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
Type Name Description
MethodDispatchType methodDispatchType

The MethodDispatchType

Type[] argumentTypes

An array of argument types to target overloads

ArgumentType[] argumentVariations

An array of ArgumentType

HarmonyDelegate(string)

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(string methodName)
Parameters
Type Name Description
string methodName

The name of the method, property or constructor to patch

HarmonyDelegate(string, MethodDispatchType)

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(string methodName, MethodDispatchType methodDispatchType)
Parameters
Type Name Description
string methodName

The name of the method, property or constructor to patch

MethodDispatchType methodDispatchType

The MethodDispatchType

HarmonyDelegate(string, params Type[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(string methodName, params Type[] argumentTypes)
Parameters
Type Name Description
string methodName

The name of the method, property or constructor to patch

Type[] argumentTypes

An array of argument types to target overloads

HarmonyDelegate(string, Type[], ArgumentType[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(string methodName, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
Type Name Description
string methodName

The name of the method, property or constructor to patch

Type[] argumentTypes

An array of argument types to target overloads

ArgumentType[] argumentVariations

An array of ArgumentType

HarmonyDelegate(Type)

An annotation that specifies a class to patch

Declaration
public HarmonyDelegate(Type declaringType)
Parameters
Type Name Description
Type declaringType

The declaring class/type

HarmonyDelegate(Type, MethodDispatchType)

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType)
Parameters
Type Name Description
Type declaringType

The declaring class/type

MethodDispatchType methodDispatchType

The MethodDispatchType

HarmonyDelegate(Type, MethodDispatchType, params Type[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType, params Type[] argumentTypes)
Parameters
Type Name Description
Type declaringType

The declaring class/type

MethodDispatchType methodDispatchType

The MethodDispatchType

Type[] argumentTypes

An array of argument types to target overloads

HarmonyDelegate(Type, MethodDispatchType, Type[], ArgumentType[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
Type Name Description
Type declaringType

The declaring class/type

MethodDispatchType methodDispatchType

The MethodDispatchType

Type[] argumentTypes

An array of argument types to target overloads

ArgumentType[] argumentVariations

Array of ArgumentType

HarmonyDelegate(Type, string)

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, string methodName)
Parameters
Type Name Description
Type declaringType

The declaring class/type

string methodName

The name of the method, property or constructor to patch

HarmonyDelegate(Type, string, MethodDispatchType)

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, string methodName, MethodDispatchType methodDispatchType)
Parameters
Type Name Description
Type declaringType

The declaring class/type

string methodName

The name of the method, property or constructor to patch

MethodDispatchType methodDispatchType

The MethodDispatchType

HarmonyDelegate(Type, string, params Type[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, string methodName, params Type[] argumentTypes)
Parameters
Type Name Description
Type declaringType

The declaring class/type

string methodName

The name of the method, property or constructor to patch

Type[] argumentTypes

An array of argument types to target overloads

HarmonyDelegate(Type, string, Type[], ArgumentType[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, string methodName, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
Type Name Description
Type declaringType

The declaring class/type

string methodName

The name of the method, property or constructor to patch

Type[] argumentTypes

An array of argument types to target overloads

ArgumentType[] argumentVariations

Array of ArgumentType

HarmonyDelegate(Type, Type[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type declaringType, Type[] argumentTypes)
Parameters
Type Name Description
Type declaringType

The declaring class/type

Type[] argumentTypes

The argument types of the method or constructor to patch

HarmonyDelegate(Type[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type[] argumentTypes)
Parameters
Type Name Description
Type[] argumentTypes

An array of argument types to target overloads

HarmonyDelegate(Type[], ArgumentType[])

An annotation that specifies a method, property or constructor to patch

Declaration
public HarmonyDelegate(Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
Type Name Description
Type[] argumentTypes

An array of argument types to target overloads

ArgumentType[] argumentVariations

An array of ArgumentType

In this article
Back to top Generated by DocFX