Table of Contents

Class DetourContext

Namespace
MonoMod.RuntimeDetour
Assembly
MonoMod.RuntimeDetour.dll
A persistent context which may be used to configure all detours created while active.
public abstract class DetourContext
Inheritance
DetourContext
Derived

Properties

Config
Gets the DetourConfig provided by this DetourContext, if any.
Current
Gets the DetourContext which is most local at the point which this is accessed.
CurrentConfig
Gets the DetourConfig active at the current location, if any.
CurrentFactory
Gets the IDetourFactory active at the current location, if any.
Factory
Gets the IDetourFactory provided by this DetourContext, if any.

Methods

GetDefaultConfig()
Gets the default DetourConfig at this location, if any.
GetDefaultFactory()
Gets the default IDetourFactory at this location.
SetGlobalContext(DetourContext?)
Sets the global DetourContext, returning the old global context, if any.
TryGetConfig(out DetourConfig?)
Tries to get the DetourConfig provided by this context.
TryGetCurrentConfig(out DetourConfig?)
Tries to get the DetourConfig active at the current location.
TryGetCurrentFactory(out IDetourFactory)
Tries to get the IDetourFactory active at the current location.
TryGetFactory(out IDetourFactory)
Tries to get the IDetourFactory provided by this context.
Use()
Pushes this detour context to the top of this thread's context stack, and returns a DataScope which can be used in a using block to automatically pop it from the context stack.