Browse documentation

Class PatchClassProcessor

Namespace
HarmonyLib
Assembly
0Harmony.dll

A PatchClassProcessor used to turn HarmonyAttribute on a class/type into patches

public class PatchClassProcessor
Inheritance
object
PatchClassProcessor

Constructors

PatchClassProcessor(Harmony, Type)

Creates a patch class processor by pointing out a class; similar to PatchAll() but without searching through all classes

public PatchClassProcessor(Harmony instance, Type type)

Parameters

instance Harmony

The Harmony instance

type Type

The class to process

Properties

Category

Name of the patch class's category

public string Category { get; set; }

Property Value

string

Methods

Patch()

Applies the patches

public List<MethodInfo> Patch()

Returns

List<MethodInfo>

A list of all created replacement methods or null if patch class is not annotated

Unpatch()

REmoves the patches

public void Unpatch()
Harmony 3 preview

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