Table of Contents

Interface ISetCoercionRuntimeSemantics

Namespace
RDCore.SDK.Runtime.Abstract
Assembly
RDCore.SDK.dll

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

session IRuntimeSession

The active run-time session — needed to resolve a live object's actual class (IRuntimeSession.TryGetInstance), since a VBObjectValue's own TypeInfo is always the generic Object type, never a specific class.

expression ExpressionNode

The expression the coerced value is attributed to, for error reporting.

source VBTypedValue

The value being coerced.

destinationType VBType

The destination's declared type — expected to be a specific class, Object, or Variant.

Returns

SetCoercionResult