Struct HarmonyPatcher
Uses the HarmonyX library for patching any methods/properties you like.
Should only be used if necessary
Assembly: WeaverCore.dll
Syntax
public struct HarmonyPatcher
Methods
|
Edit this page
View Source
Create(string)
Creates a new HarmonyPatcher
Declaration
public static HarmonyPatcher Create(string id)
Parameters
Type |
Name |
Description |
string |
id |
The id to create it with
|
Returns
|
Edit this page
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
Patch(MethodBase, MethodInfo, MethodInfo)
Patches a method with a prefix and postfix. The prefix is called before the original is called, and the postfix is called after the original method is called
Declaration
public void Patch(MethodBase original, MethodInfo prefix, MethodInfo postfix)
Parameters
Type |
Name |
Description |
MethodBase |
original |
The original method to patch
|
MethodInfo |
prefix |
The prefix method. The prefix MUST be static and return a boolean value. The returned boolean determines whether the original method should be run or not. If no prefix method is needed, this can be null
|
MethodInfo |
postfix |
The postfix method. The postfix MUST be static and return void. If no postfix is needed, this can be null
|
Exceptions
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Edit this page
View Source
operator ==(HarmonyPatcher, HarmonyPatcher)
Declaration
public static bool operator ==(HarmonyPatcher left, HarmonyPatcher right)
Parameters
Returns
|
Edit this page
View Source
operator !=(HarmonyPatcher, HarmonyPatcher)
Declaration
public static bool operator !=(HarmonyPatcher left, HarmonyPatcher right)
Parameters
Returns
Extension Methods