Namespace Concord.Detour
The detour backend. IDetourBackend redirects a target method to a replacement or wrapper. The default MonoModDetourBackend uses MonoMod.Core. A handle from ApplyComposed owns its added injections. Disposing it removes those injections. Concord rebuilds the wrapper when others remain and removes the detour when none do.
Classes
- CoexistenceLogMarkers
Stable log prefixes for coexistence events, so players and bug reports can grep one string.
- ContentionWatcher
Reports methods where Concord's injections are not running because a foreign patcher owns the entry point. With the notifier hook installed this should only ever be a target whose promotion failed; without it, every late foreign patch lands here and nothing can recover them.
- DetourBackend
Stores the process-wide detour backend used by Concord when applying native method redirects.
- ForeignRouteResult
What a foreign patch host decided when asked to take over a target method.
- InjectionOrderer
Topologically sorts injections for composition order.
- MethodIdentity
Resolves a method to one canonical MethodBase so the same target reached through different reflection paths compares and hashes as a single key.
- MonoModDetourBackend
Detour backend that delegates native method redirection to MonoMod.Core, the same engine Harmony uses. MonoMod.Core resolves the runtime generic context, so methods declared on a generic type are redirected correctly.
- RoutingDetourBackend
A detour backend that decides, per target, whether Concord installs its own detour or hands its injections to a foreign patch host. Two libraries cannot both own one entry point, so a target another patcher has already claimed goes to the host instead, and Concord's injections ride along inside it. When the host can notify Concord before it rebuilds a method, a target Concord already detoured is promoted onto the host rather than silently losing its injections.
Interfaces
- IDetourBackend
Applies native method detours for Concord.
- IDetourHandle
Represents an applied method detour.
- IForeignPatchHost
A foreign patching library that Concord can share a method with. When another library already owns a target's entry point, Concord hands its injections to the host instead of installing a second detour, because two detours cannot both control one entry point.
- IForeignPatchObserver
Receives notice from a foreign patch host that a method is about to be rebuilt, so Concord can move a target it already detoured onto the host before the host takes the entry point.
Enums
- ForeignRouteKind
The outcome of asking a foreign patch host to take over a target method.
- RouteState
How a target method's detour is owned once Concord has made a routing decision about it.