Method CreateDetour
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
factoryIDetourFactory- The IDetourFactory to use to perform the operation.
sourceMethodBase- The source method for the detour.
targetMethodBase- The target method for the detour.
applyByDefaultbool- true if the detour should be applied when this method returns; false if the caller must apply it themselves.
Returns
- ICoreDetour
- The created ICoreDetour.