Table of Contents

Class HarmonyProvider

Namespace
BUTR.CrashReport.Bannerlord
Assembly
Bannerlord.ButterLib.dll
public class HarmonyProvider : IHarmonyProvider
Inheritance
HarmonyProvider
Implements
IHarmonyProvider
Inherited Members

Methods

GetAllPatchedMethods()

Returns all patched methods.

public virtual IEnumerable<MethodBase> GetAllPatchedMethods()

Returns

IEnumerable<MethodBase>

GetIdentifiable(MethodBase)

The runtime can return several different MethodInfo's that point to the same method. Will return the correct one.

public MethodBase? GetIdentifiable(MethodBase method)

Parameters

method MethodBase

Returns

MethodBase

GetMethodFromStackframe(StackFrame)

Returns the method from a stackframe.

public virtual MethodBase? GetMethodFromStackframe(StackFrame frame)

Parameters

frame StackFrame

Returns

MethodBase

GetNativeMethodBody(MethodBase)

Returns the JIT compiled (native) start address of a method.

public IntPtr GetNativeMethodBody(MethodBase method)

Parameters

method MethodBase

Returns

IntPtr

GetOriginalMethod(MethodInfo)

Returns the original method for a given patch method.

public virtual MethodBase? GetOriginalMethod(MethodInfo replacement)

Parameters

replacement MethodInfo

The patch method

Returns

MethodBase

GetPatchInfo(MethodBase)

Returns the patch information for a given method.

public virtual HarmonyPatches? GetPatchInfo(MethodBase originalMethod)

Parameters

originalMethod MethodBase

Returns

HarmonyPatches