Class ILHook
- Namespace
- MonoMod.RuntimeDetour
- Assembly
- MonoMod.RuntimeDetour.dll
A detour type which allows the manipulation of the IL of a method, instead of merely changing its target.
[CLSCompliant(false)]
public sealed class ILHook
- Inheritance
-
ILHook
Remarks
ILHooks, like other kinds of detours, are automatically undone when the garbage collector collects the object,
or the object is disposed. Use HookInfo to get an object which represents the hook without
extending its lifetime.
Constructors
- ILHook(Expression, Manipulator)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator.
- ILHook(Expression, Manipulator, DetourConfig?)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator and DetourConfig.
- ILHook(Expression, Manipulator, DetourConfig?, bool)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator, using the specified DetourContext.
- ILHook(Expression, Manipulator, bool)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator.
- ILHook(Expression<Action>, Manipulator)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator.
- ILHook(Expression<Action>, Manipulator, DetourConfig?)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator, using the specified DetourContext.
- ILHook(Expression<Action>, Manipulator, DetourConfig?, bool)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator, using the specified DetourContext.
- ILHook(Expression<Action>, Manipulator, bool)
- Constructs an ILHook for the method specified by the provided expression tree using the provided manipulator.
- ILHook(MethodBase, Manipulator)
- Constructs an ILHook for the provided method using the provided manipulator.
- ILHook(MethodBase, Manipulator, IDetourFactory, DetourConfig?, bool)
- Constructs an ILHook for the provided method using the provided manipulator and DetourConfig
- ILHook(MethodBase, Manipulator, DetourConfig?)
- Constructs an ILHook for the provided method using the provided manipulator and DetourConfig
- ILHook(MethodBase, Manipulator, DetourConfig?, bool)
- Constructs an ILHook for the provided method using the provided manipulator and DetourConfig
- ILHook(MethodBase, Manipulator, bool)
- Constructs an ILHook for the provided method using the provided manipulator.
Properties
- Config
- Gets the DetourConfig used by this ILHook, if any.
- HookInfo
- Gets the ILHookInfo for this ILHook.
- Manipulator
- Gets the ILContext.Manipulator used by this ILHook to modify Method's IL.
Methods
- Dispose()
- Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- ~ILHook()
- Cleans up and undoes the hook, if needed.