Browse documentation

Class HarmonyMethodExtensions

Namespace
HarmonyLib
Assembly
0Harmony.dll

Annotation extensions

public static class HarmonyMethodExtensions
Inheritance
object
HarmonyMethodExtensions

Methods

Clone(HarmonyMethod)

Clones an annotation

public static HarmonyMethod Clone(this HarmonyMethod original)

Parameters

original HarmonyMethod

The HarmonyMethod to clone

Returns

HarmonyMethod

A copied HarmonyMethod

CopyTo(HarmonyMethod, HarmonyMethod)

Copies annotation information

public static void CopyTo(this HarmonyMethod from, HarmonyMethod to)

Parameters

from HarmonyMethod

The source HarmonyMethod

to HarmonyMethod

The destination HarmonyMethod

GetFromMethod(MethodBase)

Gets all annotations on a method

public static List<HarmonyMethod> GetFromMethod(MethodBase method)

Parameters

method MethodBase

The method/constructor

Returns

List<HarmonyMethod>

A list of HarmonyMethod

GetFromType(Type)

Gets all annotations on a class/type

public static List<HarmonyMethod> GetFromType(Type type)

Parameters

type Type

The class/type

Returns

List<HarmonyMethod>

A list of all HarmonyMethod

GetMergedFromMethod(MethodBase)

Gets merged annotations on a method

public static HarmonyMethod GetMergedFromMethod(MethodBase method)

Parameters

method MethodBase

The method/constructor

Returns

HarmonyMethod

The merged HarmonyMethod

GetMergedFromType(Type)

Gets merged annotations on a class/type

public static HarmonyMethod GetMergedFromType(Type type)

Parameters

type Type

The class/type

Returns

HarmonyMethod

The merged HarmonyMethod

Merge(HarmonyMethod, HarmonyMethod)

Merges annotations

public static HarmonyMethod Merge(this HarmonyMethod master, HarmonyMethod detail)

Parameters

master HarmonyMethod

The master HarmonyMethod

detail HarmonyMethod

The detail HarmonyMethod

Returns

HarmonyMethod

A new, merged HarmonyMethod

Harmony 3 preview

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