Interface ISetCoercionRuntimeSemantics
MS-VBAL 5.5.2.2 Set-coercion (run-time semantics) — coerces a value to an object reference of a given destination declared type, wherever an object value is expected (an assignment RHS, an argument, ...). Unlike ILetCoercionRuntimeSemantics, Set-coercion has no per-destination-type strategy fan-out (MS-VBAL 5.5.2.1's static table only ever demands both sides be object-ish) — this single entry point covers the whole run-time table.
public interface ISetCoercionRuntimeSemantics
Methods
EvaluateSetCoercion(IRuntimeSession, ExpressionNode, VBTypedValue, VBType)
Coerces source to an object reference of destinationType.
SetCoercionResult EvaluateSetCoercion(IRuntimeSession session, ExpressionNode expression, VBTypedValue source, VBType destinationType)
Parameters
sessionIRuntimeSessionThe active run-time session — needed to resolve a live object's actual class (IRuntimeSession.TryGetInstance), since a VBObjectValue's own
TypeInfois always the genericObjecttype, never a specific class.expressionExpressionNodeThe expression the coerced value is attributed to, for error reporting.
sourceVBTypedValueThe value being coerced.
destinationTypeVBTypeThe destination's declared type — expected to be a specific class,
Object, orVariant.