Class UnboxHandler
- Namespace
- Echo.Platforms.AsmResolver.Emulation.Dispatch.ObjectModel
- Assembly
- Echo.Platforms.AsmResolver.dll
Implements a CIL instruction handler for unbox operations.
[DispatcherTableEntry(new CilCode[] { CilCode.Unbox })]
public class UnboxHandler : UnboxHandlerBase, ICilOpCodeHandler
- Inheritance
-
UnboxHandler
- Implements
- Inherited Members
Methods
GetReturnValue(CilExecutionContext, ObjectHandle, TypeSignature)
Transforms the resolved data address into a value to be pushed onto the stack.
protected override 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.
HandleNull(CilExecutionContext, TypeSignature)
Handles the case when the pushed value is null.
protected override CilDispatchResult HandleNull(CilExecutionContext context, TypeSignature targetType)
Parameters
contextCilExecutionContextThe context to evaluate the instruction in.
targetTypeTypeSignatureThe type to convert the null reference to.
Returns
- CilDispatchResult
The final dispatcher result.