Table of Contents

Method CreateDetour

Namespace
MonoMod.Core
Assembly
MonoMod.Core.dll

CreateDetour(IDetourFactory, MethodBase, MethodBase, bool)

Creates a managed detour from source to target.
public static ICoreDetour CreateDetour(this IDetourFactory factory, MethodBase source, MethodBase target, bool applyByDefault = true)

Parameters

factory IDetourFactory
The IDetourFactory to use to perform the operation.
source MethodBase
The source method for the detour.
target MethodBase
The target method for the detour.
applyByDefault bool
true if the detour should be applied when this method returns; false if the caller must apply it themselves.

Returns

ICoreDetour
The created ICoreDetour.