docs/api/HarmonyLib.HarmonyDelegate.html
Annotation to define the original method for delegate injection
System.Object
System.Attribute
HarmonyDelegate
[AttributeUsage(AttributeTargets.Delegate, AllowMultiple = true)]
public class HarmonyDelegate : HarmonyPatch, _Attribute
An annotation that specifies call dispatching mechanics for the delegate
public HarmonyDelegate(MethodDispatchType methodDispatchType)
| Type | Name | Description |
|---|---|---|
| MethodDispatchType | methodDispatchType |
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(MethodDispatchType methodDispatchType, params Type[] argumentTypes)
| Type | Name | Description |
|---|---|---|
| MethodDispatchType | methodDispatchType |
| | System.Type[] | argumentTypes |
An array of argument types to target overloads
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(MethodDispatchType methodDispatchType, Type[] argumentTypes, ArgumentType[] argumentVariations)
| Type | Name | Description |
|---|---|---|
| MethodDispatchType | methodDispatchType |
| | System.Type[] | argumentTypes |
An array of argument types to target overloads
| | ArgumentType[] | argumentVariations |
An array of ArgumentType
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(string methodName)
| Type | Name | Description |
|---|---|---|
| System.String | methodName |
The name of the method, property or constructor to patch
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(string methodName, MethodDispatchType methodDispatchType)
| Type | Name | Description |
|---|---|---|
| System.String | methodName |
The name of the method, property or constructor to patch
| | MethodDispatchType | methodDispatchType |
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(string methodName, params Type[] argumentTypes)
| Type | Name | Description |
|---|---|---|
| System.String | methodName |
The name of the method, property or constructor to patch
| | System.Type[] | argumentTypes |
An array of argument types to target overloads
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(string methodName, Type[] argumentTypes, ArgumentType[] argumentVariations)
| Type | Name | Description |
|---|---|---|
| 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 |
An array of ArgumentType
|
An annotation that specifies a class to patch
public HarmonyDelegate(Type declaringType)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
| | MethodDispatchType | methodDispatchType |
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType, params Type[] argumentTypes)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
| | MethodDispatchType | methodDispatchType |
| | System.Type[] | argumentTypes |
An array of argument types to target overloads
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, MethodDispatchType methodDispatchType, Type[] argumentTypes, ArgumentType[] argumentVariations)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
| | MethodDispatchType | methodDispatchType |
| | System.Type[] | argumentTypes |
An array of argument types to target overloads
| | ArgumentType[] | argumentVariations |
Array of ArgumentType
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, string methodName)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
| | System.String | methodName |
The name of the method, property or constructor to patch
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, string methodName, MethodDispatchType methodDispatchType)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
| | System.String | methodName |
The name of the method, property or constructor to patch
| | MethodDispatchType | methodDispatchType |
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, string methodName, params Type[] argumentTypes)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
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
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, string methodName, Type[] argumentTypes, ArgumentType[] argumentVariations)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
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
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type declaringType, Type[] argumentTypes)
| Type | Name | Description |
|---|---|---|
| System.Type | declaringType |
The declaring class/type
| | System.Type[] | argumentTypes |
The argument types of the method or constructor to patch
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type[] argumentTypes)
| Type | Name | Description |
|---|---|---|
| System.Type[] | argumentTypes |
An array of argument types to target overloads
|
An annotation that specifies a method, property or constructor to patch
public HarmonyDelegate(Type[] argumentTypes, ArgumentType[] argumentVariations)
| Type | Name | Description |
|---|---|---|
| System.Type[] | argumentTypes |
An array of argument types to target overloads
| | ArgumentType[] | argumentVariations |
An array of ArgumentType
|