Skip to content

IMonoDetourHookApplier Interface

A type which implements this interface can be used as a detour type, meaning the type can be passed in as a generic parameter to MonoDetourHook construction methods such as Hook<TApplier>(MethodBase, Delegate, MonoDetourConfig, bool).

MonoDetour uses this to implement PrefixDetour, PostfixDetour and ILHookDetour. If none of the available detour types satisfy your needs, you can implement your own. See any of the implemented detour types for reference.

C#
public interface IMonoDetourHookApplier

For MonoDetour to be able to use a type which implements this interface, the type must have a parameterless constructor.

All the available metadata for the MonoDetour Hook.

C#
IReadOnlyMonoDetourHook Hook { get; set; }

The MonoMod.Cil.ILContext.Manipulator method that is called when the ILHook is applied.

C#
void ApplierManipulator(ILContext il)

il MonoMod.Cil.ILContext
The MonoMod.Cil.ILContext passed for manipulating the target method.