Class DefaultInvokers
- Namespace
- Echo.Platforms.AsmResolver.Emulation.Invocation
- Assembly
- Echo.Platforms.AsmResolver.dll
Provides methods for constructing method invokers using a set of default invoker implementations.
public static class DefaultInvokers
- Inheritance
-
DefaultInvokers
- Inherited Members
Properties
DelegateShim
Gets the default shim for the Delegate class.
public static DelegateInvoker DelegateShim { get; }
Property Value
IntrinsicsShim
Gets the default shim for methods found in the System.Runtime.Intrinsics namespace of the BCL.
public static IntrinsicsInvoker IntrinsicsShim { get; }
Property Value
MemoryMarshalShim
Gets the default shim for the MemoryMarshal class.
public static MemoryMarshalInvoker MemoryMarshalShim { get; }
Property Value
ReflectionInvoke
Gets the method invoker that steps over any method by invoking it via System.Reflection.
public static ReflectionInvoker ReflectionInvoke { get; }
Property Value
ReturnDefault
Gets the method invoker that always steps over the requested method and produces the default result according to the method's return type.
public static IMethodInvoker ReturnDefault { get; }
Property Value
ReturnFalse
Gets the method invoker that always steps over the requested method and produces the false constant
as a return value.
public static ReturnConstantInvoker ReturnFalse { get; }
Property Value
ReturnTrue
Gets the method invoker that always steps over the requested method and produces the true constant
as a return value.
public static ReturnConstantInvoker ReturnTrue { get; }
Property Value
ReturnUnknown
Gets the method invoker that always steps over the requested method and produces an unknown result according to the method's return type.
public static IMethodInvoker ReturnUnknown { get; }
Property Value
ReturnUnknownForExternal
Gets the method invoker that steps over any method that is not within the resolution scope of the current stack frame. That is, any method that is defined in an external assembly will be emulated as a step-over method with an unknown result.
public static ExternalMethodInvoker ReturnUnknownForExternal { get; }
Property Value
ReturnUnknownForNative
Gets the method invoker that steps over any method that does not have a CIL method body assigned by returning an unknown result, and otherwise leaves the invocation result inconclusive.
public static NativeMethodInvoker ReturnUnknownForNative { get; }
Property Value
RuntimeHelpersShim
Gets the default shim for the RuntimeHelpers class.
public static RuntimeHelpersInvoker RuntimeHelpersShim { get; }
Property Value
StepIn
Gets the method invoker that always lets the emulator step into the requested method, effectively letting the emulator emulate all called methods recursively.
public static IMethodInvoker StepIn { get; }
Property Value
StringShim
Gets the default shim for the string type.
public static StringInvoker StringShim { get; }
Property Value
UnsafeShim
Gets the default shim for the Unsafe class.
public static UnsafeInvoker UnsafeShim { get; }
Property Value
Methods
CreateDefaultShims()
Creates a method invoker that provides default shim implementations for various base class library methods that are implemented by the runtime.
public static IMethodInvoker CreateDefaultShims()
Returns
CreateShim()
Creates a new method shim invoker that multiplexes a set of methods to individual handlers.
public static MethodShimInvoker CreateShim()
Returns
HandleExternalWith(IMethodInvoker)
Gets the method invoker that forwards any method that is not within the resolution scope of the current stack frame to the provided method invoker, and otherwise leaves the invocation result inconclusive.
public static ExternalMethodInvoker HandleExternalWith(IMethodInvoker baseInvoker)
Parameters
baseInvokerIMethodInvokerThe invoker to use for producing a result when stepping over a method.
Returns
HandleNativeWith(IMethodInvoker)
Gets the method invoker that forwards any method that does not have a CIL method body assigned to the provided method invoker, and otherwise leaves the invocation result inconclusive.
public static NativeMethodInvoker HandleNativeWith(IMethodInvoker baseInvoker)
Parameters
baseInvokerIMethodInvokerThe invoker to use for producing a result when stepping over a method.
Returns
ReturnValue(BitVector)
Creates a method invoker that always steps over the requested method and returns the provided value.
public static ReturnConstantInvoker ReturnValue(BitVector value)
Parameters
valueBitVectorThe value to return.
Returns
- ReturnConstantInvoker
The invoker.
WithFallback(IMethodInvoker, IMethodInvoker)
Chains the first method invoker with the provided method invoker in such a way that if the result of the first invoker is inconclusive, the second invoker will be used as a fallback invoker.
public static MethodInvokerChain WithFallback(this IMethodInvoker self, IMethodInvoker other)
Parameters
selfIMethodInvokerThe first method invoker
otherIMethodInvokerThe fallback method invoker
Returns
- MethodInvokerChain
The constructed invoker chain.