Table of Contents

Interface IRuntime

Namespace
MonoMod.Core.Platforms
Assembly
MonoMod.Core.dll
Represents a host .NET runtime.
public interface IRuntime

Properties

Abi
Gets the Abi descriptor for this runtime.
Features
Gets the set of RuntimeFeatures that this instance supports. Some members may only be available with certain feature flags set.
Target
Gets the RuntimeKind that this instance represents.

Methods

Compile(MethodBase, RuntimeMethodHandle)
Compiles the provided method so that it has a native method body.
DisableInlining(MethodBase, RuntimeMethodHandle)
Disables inlining for a particular method. After this is called, future invocations of this method will not be inlined at the callsite by the runtime.
GetAsyncVariantRealDetourTarget(GetAsyncVariantRealDetourTargetArgs, AbiArgumentMap, out IDisposable?)
Gets the real method to detour a runtime async's async variant to.
GetIdentifiable(MethodBase)
Gets an "identifiable" MethodBase. The returned instance is safe to use with object identity to refer to specific methods.
GetMethodAbiFlags(MethodAbiUsage, MethodBase, RuntimeMethodHandle)
Gets the MethodAbiFlags for a given MethodBase, optionally specifying a specific variant via handle.
GetMethodEntryPoint(MethodBase, RuntimeMethodHandle)
Gets the real entrypoint of the provided method.
GetMethodHandle(MethodBase)
Portably gets the RuntimeMethodHandle for a given MethodBase.
PinMethodIfNeeded(MethodBase)
Pins a method so that it will not be garbage collected, if that is necessary for this runtime.
TryGetRuntimeAsyncInfo(MethodBase, out RuntimeAsyncMethodInfo)
Gets information about how the runtime's async machinery treats a method, if it does so specially.

Events

OnMethodCompiled
An event which is invoked when a method is compiled.