Class HarmonyPatch
- Namespace
- HarmonyLib
- Assembly
- 0Harmony.dll
Annotation to define your Harmony patch methods
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Delegate, AllowMultiple = true)]
public class HarmonyPatch : HarmonyAttribute
- Inheritance
-
objectAttributeHarmonyPatch
- Derived
- Inherited Members
Constructors
HarmonyPatch()
An empty annotation can be used together with TargetMethod(s)
public HarmonyPatch()
HarmonyPatch(MethodType)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(MethodType methodType)
Parameters
methodTypeMethodTypeThe MethodType
HarmonyPatch(MethodType, params Type[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(MethodType methodType, params Type[] argumentTypes)
Parameters
methodTypeMethodTypeThe MethodType
argumentTypesType[]An array of argument types to target overloads
HarmonyPatch(MethodType, Type[], ArgumentType[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(MethodType methodType, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
methodTypeMethodTypeThe MethodType
argumentTypesType[]An array of argument types to target overloads
argumentVariationsArgumentType[]An array of ArgumentType
HarmonyPatch(string)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(string methodName)
Parameters
methodNamestringThe name of the method, property or constructor to patch
HarmonyPatch(string, MethodType)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(string methodName, MethodType methodType)
Parameters
methodNamestringThe name of the method, property or constructor to patch
methodTypeMethodTypeThe MethodType
HarmonyPatch(string, string, MethodType)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(string typeName, string methodName, MethodType methodType = MethodType.Normal)
Parameters
typeNamestringThe full name of the declaring class/type
methodNamestringThe name of the method, property or constructor to patch
methodTypeMethodTypeThe MethodType
HarmonyPatch(string, params Type[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(string methodName, params Type[] argumentTypes)
Parameters
methodNamestringThe name of the method, property or constructor to patch
argumentTypesType[]An array of argument types to target overloads
HarmonyPatch(string, Type[], ArgumentType[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(string methodName, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
methodNamestringThe name of the method, property or constructor to patch
argumentTypesType[]An array of argument types to target overloads
argumentVariationsArgumentType[]An array of ArgumentType
HarmonyPatch(Type)
An annotation that specifies a class to patch
public HarmonyPatch(Type declaringType)
Parameters
declaringTypeTypeThe declaring class/type
HarmonyPatch(Type, MethodType)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, MethodType methodType)
Parameters
declaringTypeTypeThe declaring class/type
methodTypeMethodTypeThe MethodType
HarmonyPatch(Type, MethodType, params Type[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, MethodType methodType, params Type[] argumentTypes)
Parameters
declaringTypeTypeThe declaring class/type
methodTypeMethodTypeThe MethodType
argumentTypesType[]An array of argument types to target overloads
HarmonyPatch(Type, MethodType, Type[], ArgumentType[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, MethodType methodType, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
declaringTypeTypeThe declaring class/type
methodTypeMethodTypeThe MethodType
argumentTypesType[]An array of argument types to target overloads
argumentVariationsArgumentType[]Array of ArgumentType
HarmonyPatch(Type, string)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, string methodName)
Parameters
declaringTypeTypeThe declaring class/type
methodNamestringThe name of the method, property or constructor to patch
HarmonyPatch(Type, string, MethodType)
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, string methodName, MethodType methodType)
Parameters
declaringTypeTypeThe declaring class/type
methodNamestringThe name of the method, property or constructor to patch
methodTypeMethodTypeThe MethodType
HarmonyPatch(Type, string, params Type[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, string methodName, params Type[] argumentTypes)
Parameters
declaringTypeTypeThe declaring class/type
methodNamestringThe name of the method, property or constructor to patch
argumentTypesType[]An array of argument types to target overloads
HarmonyPatch(Type, string, Type[], ArgumentType[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, string methodName, Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
declaringTypeTypeThe declaring class/type
methodNamestringThe name of the method, property or constructor to patch
argumentTypesType[]An array of argument types to target overloads
argumentVariationsArgumentType[]Array of ArgumentType
HarmonyPatch(Type, Type[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type declaringType, Type[] argumentTypes)
Parameters
declaringTypeTypeThe declaring class/type
argumentTypesType[]The argument types of the method or constructor to patch
HarmonyPatch(Type[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type[] argumentTypes)
Parameters
argumentTypesType[]An array of argument types to target overloads
HarmonyPatch(Type[], ArgumentType[])
An annotation that specifies a method, property or constructor to patch
public HarmonyPatch(Type[] argumentTypes, ArgumentType[] argumentVariations)
Parameters
argumentTypesType[]An array of argument types to target overloads
argumentVariationsArgumentType[]An array of ArgumentType