Interface IBindingHandle
A handle to a binding to a runtime entity.
public interface IBindingHandle
- Extension Methods
Remarks
The value operations take IRuntimeSymbolResolver (the running session's symbols and their storage), so a handle that is not self-contained (a reference to another address, a property- or member-backed binding) can resolve its value through the same session that produced it. The self-contained literal and value cases ignore it.
Properties
BindingCapabilities
Indicates the valid members of this binding.
BindingCapabilities BindingCapabilities { get; }
Property Value
Value
The bound runtime value, read without a resolver.
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(IRuntimeSymbolResolver).
Exceptions
- NotSupportedException
The binding has no readable value.
Methods
GetValue(IRuntimeSymbolResolver)
Gets the value associated to this handle, resolving through resolver when
the binding is not self-contained.
IRuntimeValue GetValue(IRuntimeSymbolResolver resolver)
Parameters
resolverIRuntimeSymbolResolverThe running session's symbols and their storage, which a binding that is not self-contained is read through.
Returns
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.
IRuntimeValue Invoke(IRuntimeSymbolResolver resolver, IRuntimeValue[] args)
Parameters
resolverIRuntimeSymbolResolverThe running session's symbols and their storage, which the call is made in.
argsIRuntimeValue[]The arguments of the call.
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(IRuntimeSymbolResolver, IRuntimeValue)
Sets the value associated to this handle.
void SetValue(IRuntimeSymbolResolver resolver, IRuntimeValue value)
Parameters
resolverIRuntimeSymbolResolverThe running session's symbols and their storage, which a binding that is not self-contained is written through.
valueIRuntimeValueThe value to assign.
Remarks
👉 Verify that the binding supports SetValue.
Exceptions
- NotSupportedException
The binding does not support SetValue.