Class IndeterminateBindingHandle
A binding to a value that is not known: what an expression yields when it is analyzed rather than run, and its operands are not constant.
public sealed record IndeterminateBindingHandle : IBindingHandle, IEquatable<IndeterminateBindingHandle>
- Inheritance
-
IndeterminateBindingHandle
- Implements
- Inherited Members
- Extension Methods
Remarks
The binding yields the value it is given to assume, so that a semantics that reads its operands' values evaluates as it would for any value of the same type. The assumed value is a stand-in, not a fact: whatever is derived from an indeterminate value is indeterminate too, and nothing an evaluation raises because of an assumed value is known to happen (IsIndeterminate).
An indeterminate value is never assigned: the binding refuses SetValue.
Constructors
IndeterminateBindingHandle(IBindingHandle)
Creates a binding to a value that is not known, which yields the value of assumed.
public IndeterminateBindingHandle(IBindingHandle assumed)
Parameters
assumedIBindingHandleThe binding to the value assumed in place of the value that is not known.
Properties
Assumed
The binding to the value assumed in place of the value that is not known.
public IBindingHandle Assumed { get; }
Property Value
BindingCapabilities
Indicates the valid members of this binding.
public BindingCapabilities BindingCapabilities { get; }
Property Value
Value
The bound runtime value, read without a resolver.
public IRuntimeValue Value { get; }
Property Value
Remarks
👉 A direct read for the common literal/value cases. Handles that resolve a value lazily or via a reference still expose GetValue(ISymbolResolver).
Exceptions
- NotSupportedException
The binding has no readable value.
Methods
GetValue(ISymbolResolver)
Gets the value associated to this handle, resolving through resolver when
the binding is not self-contained.
public IRuntimeValue GetValue(ISymbolResolver resolver)
Parameters
resolverISymbolResolver
Returns
Remarks
👉 Verify that the binding supports GetValue.
Exceptions
Invoke(ISymbolResolver, 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(ISymbolResolver resolver, IRuntimeValue[] args)
Parameters
resolverISymbolResolverargsIRuntimeValue[]
Returns
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(ISymbolResolver, IRuntimeValue)
Always throws: a value that is not known is not assigned.
public void SetValue(ISymbolResolver resolver, IRuntimeValue value)
Parameters
resolverISymbolResolvervalueIRuntimeValue
Exceptions
- NotSupportedException
Always.