HookTargetRecords Class
Definition
Section titled “Definition”An API for hooks to share information about target methods.
public static class HookTargetRecordsInheritance object
Methods
Section titled “Methods”InitializeIfNeeded()
Section titled “InitializeIfNeeded()”Initializes MonoDetour’s hooks on MonoMod to allow tracking of “original” instructions of methods.
public static void InitializeIfNeeded()Remarks
Section titled “Remarks”It is only necessary to call this if you need to use GetHookTargetInfo(MethodDefinition) without using any MonoDetourHooks which would have initialized this automatically.
This also initializes some other unrelated but useful tweaks MonoDetour expects.
GetHookTargetInfo(ILContext)
Section titled “GetHookTargetInfo(ILContext)”Gets a HookTargetRecords.HookTargetInfo for a target method.
public static HookTargetRecords.HookTargetInfo GetHookTargetInfo(ILContext il)Parameters
Section titled “Parameters”il MonoMod.Cil.ILContext
The MonoMod.Cil.ILContext for the target method.
Returns
Section titled “Returns”HookTargetRecords.HookTargetInfo
A HookTargetRecords.HookTargetInfo for the target method.
GetHookTargetInfo(MethodDefinition)
Section titled “GetHookTargetInfo(MethodDefinition)”Gets a HookTargetRecords.HookTargetInfo for a target method.
public static HookTargetRecords.HookTargetInfo GetHookTargetInfo(MethodDefinition method)Parameters
Section titled “Parameters”method MethodDefinition
The target MethodDefinition.
Returns
Section titled “Returns”HookTargetRecords.HookTargetInfo
A HookTargetRecords.HookTargetInfo for the target method.