Show / Hide Table of Contents

Class PatchInfo

Serializable patch information

Inheritance
System.Object
PatchInfo
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: HarmonyLib
Assembly: 0Harmony.dll
Syntax
[Serializable]
public class PatchInfo

Constructors

| Improve this Doc View Source

PatchInfo()

Default constructor

Declaration
public PatchInfo()

Fields

| Improve this Doc View Source

finalizers

Finalizers as an array of Patch

Declaration
public Patch[] finalizers
Field Value
Type Description
Patch[]
| Improve this Doc View Source

postfixes

Postfixes as an array of Patch

Declaration
public Patch[] postfixes
Field Value
Type Description
Patch[]
| Improve this Doc View Source

prefixes

Prefixes as an array of Patch

Declaration
public Patch[] prefixes
Field Value
Type Description
Patch[]
| Improve this Doc View Source

transpilers

Transpilers as an array of Patch

Declaration
public Patch[] transpilers
Field Value
Type Description
Patch[]

Properties

| Improve this Doc View Source

Debugging

Returns if any of the patches wants debugging turned on

Declaration
public bool Debugging { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

AddFinalizer(MethodInfo, String, Int32, String[], String[], Boolean)

Adds a finalizer

Declaration
public void AddFinalizer(MethodInfo patch, string owner, int priority, string[] before, string[] after, bool debug)
Parameters
Type Name Description
System.Reflection.MethodInfo patch

The finalizer method

System.String owner

An owner (Harmony ID)

System.Int32 priority

The priority, see Priority

System.String[] before

A list of Harmony IDs for finalizers that should run after this finalizer

System.String[] after

A list of Harmony IDs for finalizers that should run before this finalizer

System.Boolean debug

A flag that will log the replacement method via FileLog every time this patch is used to build the replacement, even in the future

| Improve this Doc View Source

AddPostfix(MethodInfo, String, Int32, String[], String[], Boolean)

Adds a postfix

Declaration
public void AddPostfix(MethodInfo patch, string owner, int priority, string[] before, string[] after, bool debug)
Parameters
Type Name Description
System.Reflection.MethodInfo patch

The postfix method

System.String owner

An owner (Harmony ID)

System.Int32 priority

The priority, see Priority

System.String[] before

A list of Harmony IDs for postfixes that should run after this postfix

System.String[] after

A list of Harmony IDs for postfixes that should run before this postfix

System.Boolean debug

A flag that will log the replacement method via FileLog every time this postfix is used to build the replacement, even in the future

| Improve this Doc View Source

AddPrefix(MethodInfo, String, Int32, String[], String[], Boolean)

Adds a prefix

Declaration
public void AddPrefix(MethodInfo patch, string owner, int priority, string[] before, string[] after, bool debug)
Parameters
Type Name Description
System.Reflection.MethodInfo patch

The prefix method

System.String owner

An owner (Harmony ID)

System.Int32 priority

The priority, see Priority

System.String[] before

A list of Harmony IDs for prefixes that should run after this prefix

System.String[] after

A list of Harmony IDs for prefixes that should run before this prefix

System.Boolean debug

A flag that will log the replacement method via FileLog every time this prefix is used to build the replacement, even in the future

| Improve this Doc View Source

AddTranspiler(MethodInfo, String, Int32, String[], String[], Boolean)

Adds a transpiler

Declaration
public void AddTranspiler(MethodInfo patch, string owner, int priority, string[] before, string[] after, bool debug)
Parameters
Type Name Description
System.Reflection.MethodInfo patch

The transpiler method

System.String owner

An owner (Harmony ID)

System.Int32 priority

The priority, see Priority

System.String[] before

A list of Harmony IDs for transpilers that should run after this transpiler

System.String[] after

A list of Harmony IDs for transpilers that should run before this transpiler

System.Boolean debug

A flag that will log the replacement method via FileLog every time this patch is used to build the replacement, even in the future

| Improve this Doc View Source

RemoveFinalizer(String)

Removes finalizers

Declaration
public void RemoveFinalizer(string owner)
Parameters
Type Name Description
System.String owner

The owner of the finalizer or * for any finalizer

| Improve this Doc View Source

RemovePatch(MethodInfo)

Removes a patch using its method

Declaration
public void RemovePatch(MethodInfo patch)
Parameters
Type Name Description
System.Reflection.MethodInfo patch

The method of the patch to remove

| Improve this Doc View Source

RemovePostfix(String)

Removes postfixes

Declaration
public void RemovePostfix(string owner)
Parameters
Type Name Description
System.String owner

The owner of the postfix or * for any postfix

| Improve this Doc View Source

RemovePrefix(String)

Removes prefixes

Declaration
public void RemovePrefix(string owner)
Parameters
Type Name Description
System.String owner

The owner of the prefix or * for any prefix

| Improve this Doc View Source

RemoveTranspiler(String)

Removes transpilers

Declaration
public void RemoveTranspiler(string owner)
Parameters
Type Name Description
System.String owner

The owner of the transpiler or * for any transpiler

  • Improve this Doc
  • View Source
Back to top Generated by DocFX