You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ticket must be completed in order to advance a milestone.
ℹ️ CONTEXT
Most semantic values are currently created via a default constructor, then copied .WithValue, and then sometimes it's through VBTypedValueFactory, other times it's created directly... it's a mess and it needs a cleanup.
The target is the way VBBooleanTypedValue does it:
All semantic values must be creatable via a constructor call that passes in an IBindingHandle;
Ultimately the UnderlyingValue property gets completely removed, callers using Handle.GetValue instead.
Note
IBindingHandle may or may not hold the underlying value: ValueBindingHandle and ConstantBindingHandle both hold the underlying bytes, but ReferenceBindingHandle finds the value in program memory.
👉 TODO
Clean up construction of all semantic values:
Add a constructor accepting IBindingHandle;
Add a convenience constructor overload accepting an appropriately typed .net value; use it to create a ValueBindingHandle and pass it to the other constructor;
Edit the DefaultValue property and backing field to invoke the new, simpler constructors; use the same pattern everywhere;
Ensure VBTypedValueFactory calls the convenience constructor;
Tip
VBTypedValueFactory is slated to be inlined and removed; this could be a good opportunity to do this, or to prepare the ground for it by replacing factory calls with constructor calls.
✅ ACCEPTANCE CRITERIA
CLA compliance
All tests pass
All semantic values no longer expose a default parameterless constructor
All default values use the same pattern across the semantic layer
All semantic values can be created with an IBindingHandle
ℹ️ CONTEXT
Most semantic values are currently created via a default constructor, then copied .WithValue, and then sometimes it's through VBTypedValueFactory, other times it's created directly... it's a mess and it needs a cleanup.
The target is the way
VBBooleanTypedValuedoes it:IBindingHandle;UnderlyingValueproperty gets completely removed, callers usingHandle.GetValueinstead.Note
IBindingHandle may or may not hold the underlying value:
ValueBindingHandleandConstantBindingHandleboth hold the underlying bytes, butReferenceBindingHandlefinds the value in program memory.👉 TODO
Clean up construction of all semantic values:
IBindingHandle;ValueBindingHandleand pass it to the other constructor;Tip
VBTypedValueFactory is slated to be inlined and removed; this could be a good opportunity to do this, or to prepare the ground for it by replacing factory calls with constructor calls.
✅ ACCEPTANCE CRITERIA
IBindingHandle