Class UnboxHandlerBase
- Namespace
- Echo.Platforms.AsmResolver.Emulation.Dispatch.ObjectModel
- Assembly
- Echo.Platforms.AsmResolver.dll
Provides a base for instructions implementing unboxing behavior.
public abstract class UnboxHandlerBase : CastOpCodeHandlerBase, ICilOpCodeHandler
- Inheritance
-
UnboxHandlerBase
- Implements
- Derived
- Inherited Members
Methods
GetReturnValue(CilExecutionContext, ObjectHandle, TypeSignature)
Transforms the resolved data address into a value to be pushed onto the stack.
protected abstract StackSlot GetReturnValue(CilExecutionContext context, ObjectHandle handle, TypeSignature targetType)
Parameters
contextCilExecutionContextThe context in which the instruction is emulated in.
handleObjectHandleThe address.
targetTypeTypeSignatureThe data type of the value at the address.
Returns
- StackSlot
The return value.
HandleSuccessfulCast(CilExecutionContext, ObjectHandle, TypeSignature)
Handles the case when the pushed value is compatible with the type specified in the instruction.
protected override CilDispatchResult HandleSuccessfulCast(CilExecutionContext context, ObjectHandle handle, TypeSignature targetType)
Parameters
contextCilExecutionContextThe context to evaluate the instruction in.
handleObjectHandleThe address of the object.
targetTypeTypeSignatureThe type to convert the object to to.
Returns
- CilDispatchResult
The final dispatcher result.