Class HarmonyMethodExtensions
Annotation extensions
Inheritance
System.Object
HarmonyMethodExtensions
Namespace: HarmonyLib
Assembly: 0Harmony.dll
Syntax
public static class HarmonyMethodExtensions
Methods
| Improve this Doc View SourceClone(HarmonyMethod)
Clones an annotation
Declaration
public static HarmonyMethod Clone(this HarmonyMethod original)
Parameters
Type | Name | Description |
---|---|---|
HarmonyMethod | original | The HarmonyMethod to clone |
Returns
Type | Description |
---|---|
HarmonyMethod | A copied HarmonyMethod |
CopyTo(HarmonyMethod, HarmonyMethod)
Copies annotation information
Declaration
public static void CopyTo(this HarmonyMethod from, HarmonyMethod to)
Parameters
Type | Name | Description |
---|---|---|
HarmonyMethod | from | 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
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method/constructor |
Returns
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
System.Type | type | The class/type |
Returns
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method/constructor |
Returns
Type | Description |
---|---|
HarmonyMethod | The merged HarmonyMethod |
GetMergedFromType(Type)
Gets merged annotations on a class/type
Declaration
public static HarmonyMethod GetMergedFromType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The class/type |
Returns
Type | Description |
---|---|
HarmonyMethod | The merged HarmonyMethod |
Merge(HarmonyMethod, HarmonyMethod)
Merges annotations
Declaration
public static HarmonyMethod Merge(this HarmonyMethod master, HarmonyMethod detail)
Parameters
Type | Name | Description |
---|---|---|
HarmonyMethod | master | The master HarmonyMethod |
HarmonyMethod | detail | The detail HarmonyMethod |
Returns
Type | Description |
---|---|
HarmonyMethod | A new, merged HarmonyMethod |