Skip to content

MonoDetour.DetourTypes

ILHookDetourImplements MonoDetour support for a MonoMod.RuntimeDetour.ILHook which supports modifying the target method on the CIL level with a manipulator method of type ILManipulationInfo.Manipulator.
PostfixDetourImplements MonoDetour support for a Hook that will run at the end of the target method.
PrefixDetourImplements MonoDetour support for a Hook that will run at the start of the target method.
IMonoDetourHookApplierA 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.
ReturnFlowSpecifies how the return value affects control flow.