Table of Contents

Class ReferenceBindingHandle

Namespace
RDCore.SDK.Model.Values.Bindings
Assembly
RDCore.SDK.dll

Represents a handle to an internally addressed, writable reference to a VBTypedValue.

public record ReferenceBindingHandle : IKnowledgeBinding, IBindingHandle, IEquatable<ReferenceBindingHandle>
Inheritance
ReferenceBindingHandle
Implements
Inherited Members
Extension Methods

Constructors

ReferenceBindingHandle(VBRuntimeReference)

public ReferenceBindingHandle(VBRuntimeReference value)

Parameters

value VBRuntimeReference

Properties

BindingCapabilities

Indicates the valid members of this binding.

public BindingCapabilities BindingCapabilities { get; }

Property Value

BindingCapabilities

IsKnown

Whether the value held is known. When it is not, the value held is the one its type assumes.

public bool IsKnown { get; }

Property Value

bool

Value

The bound runtime value, read without a resolver.

public IRuntimeValue Value { get; }

Property Value

IRuntimeValue

Remarks

👉 A direct read for the common literal/value cases. Handles that resolve a value lazily or via a reference still expose GetValue(IRuntimeSymbolResolver).

Exceptions

NotSupportedException

The binding has no readable value.

Methods

Forget()

Makes the value held not known, keeping it as the value assumed in its place.

public void Forget()

GetValue(IRuntimeSymbolResolver)

Gets the value associated to this handle, resolving through resolver when the binding is not self-contained.

public IRuntimeValue GetValue(IRuntimeSymbolResolver resolver)

Parameters

resolver IRuntimeSymbolResolver

The running session's symbols and their storage, which a binding that is not self-contained is read through.

Returns

IRuntimeValue

Remarks

👉 Verify that the binding supports GetValue.

Exceptions

NotSupportedException

The binding does not support GetValue.

Invoke(IRuntimeSymbolResolver, IRuntimeValue[])

Invokes the callable entity associated to this handle, and returns the runtime value it yields - an HRESULT (S_OK), for one that yields no value.

public IRuntimeValue Invoke(IRuntimeSymbolResolver resolver, IRuntimeValue[] args)

Parameters

resolver IRuntimeSymbolResolver

The running session's symbols and their storage, which the call is made in.

args IRuntimeValue[]

The arguments of the call.

Returns

IRuntimeValue

Remarks

👉 Verify that the binding supports Invoke.
A handle to code that runs on a call stack does not push the frame itself: it hands the call to an IProcedureInvoker.

Exceptions

NotSupportedException

The binding does not support Invoke.

VBRuntimeErrorException

A run-time error was raised by the invoked entity and nothing handled it.

SetValue(IRuntimeSymbolResolver, IRuntimeValue)

public void SetValue(IRuntimeSymbolResolver resolver, IRuntimeValue value)

Parameters

resolver IRuntimeSymbolResolver

Unused: the reference is held by the handle.

value IRuntimeValue

The reference to store.

Remarks

Stores a reference that is known: a write that may be of one that is not says so with Store(IRuntimeValue, bool).

Store(IRuntimeValue, bool)

Replaces the value held, and says whether the new value is known.

public void Store(IRuntimeValue value, bool isKnown)

Parameters

value IRuntimeValue

The new value, or the value assumed in place of one that is not known.

isKnown bool

Whether value is known.