MonoMod.Core 1.0.0-prerelease.1
THIS IS PROBABLY NOT THE LIBRARY YOU WANT TO BE USING. You probably want RuntimeDetour instead.
You have been warned.
Notable APIs
MonoMod.Core.DetourFactory.CurrentMonoMod.Core.ICoreDetour
Usage
Use DetourFactory.Current.CreateDetour to create a single detour from one method to another. The detour will be
automatically undone when the returnedc object is disposed or garbage collected. Only one such detour may be made per
method. If multiple are made, they will not be cleaned up properly. MonoMod.Core does not track which methods have
already been detoured, and will not throw.
It is therefore highly recommended to use a higher-level detouring API (like that provided by
MonoMod.RuntimeDetour or Harmony) to perform detours. Those higher level APIs also provide solutions to many of
the limitations to Core's detour abstraction, such as the ability to call the original, unmodified method, or
modify the IL of the method. (See their documentation for how this is actually done.)
Other potentially useful APIs
The default IDetourFactory utilizes MonoMod.Core.Platforms.PlatformTriple.Current to implement detours. Notably,
that factory handles re-creating the underlying ISimpleNativeDetour objects when methods are recompiled by the
runtime.
PlatformTriple does provide a few other utilities which may be useful for a higher-level library, however:
PlatformTriple.PrepareJIT compiles a method, sully supporting generic instantiationsPlatformTriple.GetIdentifiabletranslates the providedMethodBaseinto an instance which can be used as, for instance, the key to aConditionalWeakTable
The other methods of PlatformTriple are means of implementing the detour factory, and likely should not be touched.
Showing the top 20 packages that depend on MonoMod.Core.
| Packages | Downloads |
|---|---|
|
MonoMod.RuntimeDetour
Flexible and easily extensible runtime detouring library. Wrap, replace and manipulate (Mono.Cecil) methods at runtime.
|
5 |
|
MonoMod.RuntimeDetour
Flexible and easily extensible runtime detouring library. Wrap, replace and manipulate (Mono.Cecil) methods at runtime.
|
4 |
|
MonoMod.RuntimeDetour
Flexible and easily extensible runtime detouring library. Wrap, replace and manipulate (Mono.Cecil) methods at runtime.
|
1 |
.NET 6.0
- Mono.Cecil (>= 0.11.4)
- MonoMod.Backports (>= 1.0.0-prerelease.1)
- MonoMod.ILHelpers (>= 1.0.0-prerelease.1)
- MonoMod.Utils (>= 25.0.0-prerelease.1)
.NET 5.0
- Mono.Cecil (>= 0.11.4)
- MonoMod.Backports (>= 1.0.0-prerelease.1)
- MonoMod.ILHelpers (>= 1.0.0-prerelease.1)
- MonoMod.Utils (>= 25.0.0-prerelease.1)
.NET 7.0
- Mono.Cecil (>= 0.11.4)
- MonoMod.Backports (>= 1.0.0-prerelease.1)
- MonoMod.ILHelpers (>= 1.0.0-prerelease.1)
- MonoMod.Utils (>= 25.0.0-prerelease.1)
.NET Standard 2.0
- Mono.Cecil (>= 0.11.4)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- MonoMod.Backports (>= 1.0.0-prerelease.1)
- MonoMod.ILHelpers (>= 1.0.0-prerelease.1)
- MonoMod.Utils (>= 25.0.0-prerelease.1)
.NET Framework 3.5
- Mono.Cecil (>= 0.10.4)
- MonoMod.Backports (>= 1.0.0-prerelease.1)
- MonoMod.ILHelpers (>= 1.0.0-prerelease.1)
- MonoMod.Utils (>= 25.0.0-prerelease.1)
.NET Framework 4.5.2
- Mono.Cecil (>= 0.11.4)
- MonoMod.Backports (>= 1.0.0-prerelease.1)
- MonoMod.ILHelpers (>= 1.0.0-prerelease.1)
- MonoMod.Utils (>= 25.0.0-prerelease.1)
| Version | Downloads | Last updated |
|---|---|---|
| 1.3.3 | 4 | 2025/11/19 |
| 1.3.2 | 1 | 2025/11/19 |
| 1.3.1 | 1 | 2025/11/19 |
| 1.3.0 | 6 | 2025/9/4 |
| 1.2.3 | 1 | 2025/11/19 |
| 1.2.2 | 2 | 2025/9/3 |
| 1.2.1 | 1 | 2025/11/19 |
| 1.2.0.1 | 1 | 2025/11/19 |
| 1.2.0 | 1 | 2025/11/19 |
| 1.1.2 | 1 | 2025/11/19 |
| 1.1.1 | 1 | 2025/11/19 |
| 1.1.0 | 2 | 2025/11/19 |
| 1.1.0-prerelease.2 | 1 | 2025/11/19 |
| 1.1.0-prerelease.1 | 1 | 2025/11/19 |
| 1.0.1 | 1 | 2025/11/19 |
| 1.0.0 | 1 | 2025/11/19 |
| 1.0.0-prerelease.2 | 1 | 2025/11/19 |
| 1.0.0-prerelease.1 | 1 | 2025/11/19 |