Back to Harmony

Class HarmonyMethodExtensions

docs/api/HarmonyLib.HarmonyMethodExtensions.html

2.4.2.03.7 KB
Original Source

Class HarmonyMethodExtensions

Annotation extensions

Inheritance

System.Object

HarmonyMethodExtensions

Namespace : HarmonyLib
Assembly : 0Harmony.dll
Syntax
public static class HarmonyMethodExtensions

Methods

Clone(HarmonyMethod)

Clones an annotation

Declaration
public static HarmonyMethod Clone(this HarmonyMethod original)
Parameters
TypeNameDescription
HarmonyMethodoriginal

The HarmonyMethod to clone

|

Returns
TypeDescription
HarmonyMethod

A copied HarmonyMethod

|

CopyTo(HarmonyMethod, HarmonyMethod)

Copies annotation information

Declaration
public static void CopyTo(this HarmonyMethod from, HarmonyMethod to)
Parameters
TypeNameDescription
HarmonyMethodfrom

The source HarmonyMethod

| | HarmonyMethod | to |

The destination HarmonyMethod

|

GetFromMethod(MethodBase)

Gets all annotations on a method

Declaration
public static List<HarmonyMethod> GetFromMethod(MethodBase method)
Parameters
TypeNameDescription
System.Reflection.MethodBasemethod

The method/constructor

|

Returns
TypeDescription
System.Collections.Generic.List<HarmonyMethod>

A list of HarmonyMethod

|

GetFromType(Type)

Gets all annotations on a class/type

Declaration
public static List<HarmonyMethod> GetFromType(Type type)
Parameters
TypeNameDescription
System.Typetype

The class/type

|

Returns
TypeDescription
System.Collections.Generic.List<HarmonyMethod>

A list of all HarmonyMethod

|

GetMergedFromMethod(MethodBase)

Gets merged annotations on a method

Declaration
public static HarmonyMethod GetMergedFromMethod(MethodBase method)
Parameters
TypeNameDescription
System.Reflection.MethodBasemethod

The method/constructor

|

Returns
TypeDescription
HarmonyMethod

The merged HarmonyMethod

|

GetMergedFromType(Type)

Gets merged annotations on a class/type

Declaration
public static HarmonyMethod GetMergedFromType(Type type)
Parameters
TypeNameDescription
System.Typetype

The class/type

|

Returns
TypeDescription
HarmonyMethod

The merged HarmonyMethod

|

Merge(HarmonyMethod, HarmonyMethod)

Merges annotations

Declaration
public static HarmonyMethod Merge(this HarmonyMethod master, HarmonyMethod detail)
Parameters
TypeNameDescription
HarmonyMethodmaster

The master HarmonyMethod

| | HarmonyMethod | detail |

The detail HarmonyMethod

|

Returns
TypeDescription
HarmonyMethod

A new, merged HarmonyMethod

|