Back to Harmony

Class HarmonyDelegate

docs/api/HarmonyLib.HarmonyDelegate.html

2.4.2.09.9 KB
Original Source

Class HarmonyDelegate

Annotation to define the original method for delegate injection

Inheritance

System.Object

System.Attribute

HarmonyAttribute

HarmonyPatch

HarmonyDelegate

Inherited Members

HarmonyAttribute.info

Namespace : HarmonyLib
Assembly : 0Harmony.dll
Syntax
[AttributeUsage(AttributeTargets.Delegate, AllowMultiple = true)]
public class HarmonyDelegate : HarmonyPatch, _Attribute

Constructors

HarmonyDelegate(MethodDispatchType)

An annotation that specifies call dispatching mechanics for the delegate

Declaration
public HarmonyDelegate(MethodDispatchType methodDispatchType)
Parameters
TypeNameDescription
MethodDispatchTypemethodDispatchType

The MethodDispatchType

|

HarmonyDelegate(MethodDispatchType, Type[])

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

Declaration
public HarmonyDelegate(MethodDispatchType methodDispatchType, params Type[] argumentTypes)
Parameters
TypeNameDescription
MethodDispatchTypemethodDispatchType

The MethodDispatchType

| | System.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
TypeNameDescription
MethodDispatchTypemethodDispatchType

The MethodDispatchType

| | System.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
TypeNameDescription
System.StringmethodName

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
TypeNameDescription
System.StringmethodName

The name of the method, property or constructor to patch

| | MethodDispatchType | methodDispatchType |

The MethodDispatchType

|

HarmonyDelegate(String, Type[])

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

Declaration
public HarmonyDelegate(string methodName, params Type[] argumentTypes)
Parameters
TypeNameDescription
System.StringmethodName

The name of the method, property or constructor to patch

| | System.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
TypeNameDescription
System.StringmethodName

The name of the method, property or constructor to patch

| | System.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
TypeNameDescription
System.TypedeclaringType

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
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | MethodDispatchType | methodDispatchType |

The MethodDispatchType

|

HarmonyDelegate(Type, MethodDispatchType, Type[])

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

Declaration
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType, params Type[] argumentTypes)
Parameters
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | MethodDispatchType | methodDispatchType |

The MethodDispatchType

| | System.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
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | MethodDispatchType | methodDispatchType |

The MethodDispatchType

| | System.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
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | System.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
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | System.String | methodName |

The name of the method, property or constructor to patch

| | MethodDispatchType | methodDispatchType |

The MethodDispatchType

|

HarmonyDelegate(Type, String, Type[])

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

Declaration
public HarmonyDelegate(Type declaringType, string methodName, params Type[] argumentTypes)
Parameters
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | System.String | methodName |

The name of the method, property or constructor to patch

| | System.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
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | System.String | methodName |

The name of the method, property or constructor to patch

| | System.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
TypeNameDescription
System.TypedeclaringType

The declaring class/type

| | System.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
TypeNameDescription
System.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
TypeNameDescription
System.Type[]argumentTypes

An array of argument types to target overloads

| | ArgumentType[] | argumentVariations |

An array of ArgumentType

|