Skip to content
Concord

Interface IDetourBackend

Namespace
Concord.Detour
Assembly
Concord.Detour.dll

Applies native method detours for Concord.

public interface IDetourBackend

Methods

Apply(MethodBase, MethodInfo)

Redirects calls from a target method to its wrapper.

IDetourHandle Apply(MethodBase original, MethodInfo replacement)

Parameters

original MethodBase

The method to redirect.

replacement MethodInfo

The wrapper to execute instead.

Returns

IDetourHandle

A handle that reports detour state and restores the original method when disposed.

ApplyComposed(MethodBase, IReadOnlyList<Injection>)

Installs or replaces the single detour for target, composing one wrapper from every currently-live injection on that target plus added. Disposing the returned handle removes the injections it owns and recomposes (or removes) the target's detour.

IDetourHandle ApplyComposed(MethodBase target, IReadOnlyList<Injection> added)

Parameters

target MethodBase

The method to redirect.

added IReadOnlyList<Injection>

The injections this call contributes to the target's composed wrapper.

Returns

IDetourHandle

A handle that reports detour state and removes only the injections it owns when disposed.