Struct CilDispatchResult
- Namespace
- Echo.Platforms.AsmResolver.Emulation.Dispatch
- Assembly
- Echo.Platforms.AsmResolver.dll
Provides information about the result of an instruction dispatch.
public readonly struct CilDispatchResult : IEquatable<CilDispatchResult>
- Implements
- Inherited Members
Properties
ExceptionObject
When IsSuccess is false, gets the o that represents the pointer to the exception
that was thrown during the evaluation of the instruction.
public ObjectHandle ExceptionObject { get; }
Property Value
IsSuccess
Gets a value indicating whether the dispatch and evaluation of the instruction was successful.
public bool IsSuccess { get; }
Property Value
Methods
Equals(CilDispatchResult)
public bool Equals(CilDispatchResult other)
Parameters
otherCilDispatchResult
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Exception(CilVirtualMachine, ITypeDescriptor)
Creates a new dispatch result indicating the dispatch failed with an exception.
public static CilDispatchResult Exception(CilVirtualMachine machine, ITypeDescriptor type)
Parameters
machineCilVirtualMachineThe machine to allocate the exception in.
typeITypeDescriptorThe type of exception to allocate.
Returns
Exception(ObjectHandle)
Creates a new dispatch result indicating the dispatch failed with an exception.
public static CilDispatchResult Exception(ObjectHandle exceptionObject)
Parameters
exceptionObjectObjectHandleThe handle to the exception object that was thrown.
Returns
GetHashCode()
public override int GetHashCode()
Returns
IndexOutOfRange(CilExecutionContext)
Creates a new dispatch result indicating the dispatch failed due to an index being out of range.
public static CilDispatchResult IndexOutOfRange(CilExecutionContext context)
Parameters
contextCilExecutionContextThe context the instruction was evaluated in.
Returns
InvalidCast(CilExecutionContext, TypeSignature, TypeSignature)
Creates a new dispatch result indicating the dispatch failed due to a stack overflow.
public static CilDispatchResult InvalidCast(CilExecutionContext context, TypeSignature originalType, TypeSignature targetType)
Parameters
contextCilExecutionContextThe context the instruction was evaluated in.
originalTypeTypeSignatureThe original object type.
targetTypeTypeSignatureThe type that the object was attempted to be casted to.
Returns
InvalidProgram(CilExecutionContext)
Creates a new dispatch result indicating the dispatch failed due to an invalid program.
public static CilDispatchResult InvalidProgram(CilExecutionContext context)
Parameters
contextCilExecutionContextThe context the instruction was evaluated in.
Returns
NullReference(CilExecutionContext)
Creates a new dispatch result indicating the dispatch failed due to a null reference.
public static CilDispatchResult NullReference(CilExecutionContext context)
Parameters
contextCilExecutionContextThe context the instruction was evaluated in.
Returns
Overflow(CilExecutionContext)
Creates a new dispatch result indicating the dispatch failed due to an integer overflow.
public static CilDispatchResult Overflow(CilExecutionContext context)
Parameters
contextCilExecutionContextThe context the instruction was evaluated in.
Returns
StackOverflow(CilExecutionContext)
Creates a new dispatch result indicating the dispatch failed due to a stack overflow.
public static CilDispatchResult StackOverflow(CilExecutionContext context)
Parameters
contextCilExecutionContextThe context the instruction was evaluated in.
Returns
Success()
Creates a new dispatch result indicating the dispatch was successful.
public static CilDispatchResult Success()
Returns
ToString()
public override string ToString()