Browse documentation

Class ReversePatcher

Namespace
HarmonyLib
Assembly
0Harmony.dll

A reverse patcher

public class ReversePatcher
Inheritance
object
ReversePatcher

Constructors

ReversePatcher(Harmony, MethodBase, HarmonyMethod)

Creates a reverse patcher

public ReversePatcher(Harmony instance, MethodBase original, HarmonyMethod standin)

Parameters

instance Harmony

The Harmony instance

original MethodBase

The original method/constructor

standin HarmonyMethod

Your stand-in stub method as HarmonyMethod

Methods

Patch(HarmonyReversePatchType)

Applies the patch

public MethodInfo Patch(HarmonyReversePatchType type = HarmonyReversePatchType.Original)

Parameters

type HarmonyReversePatchType

The type of patch, see HarmonyReversePatchType

Returns

MethodInfo

The generated replacement method

Harmony 3 preview

For the stable release, read the 2.x documentation.