There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Cleanup of orphaned Property Bindings
When an author selects to use a specific type of automation in their Pattern Model (i.e. they select a Command, or a Condition, or a Value Provider etc) in any of the many places where these are configured (i.e. on the Type of a Command Automation or LaunchPoint,
in the Conditions of a LaunchPoint, on the Value Provider of a Variable Property etc.) the 'designtime' properties of that specific type are persisted into the Pattern Model file. And the author can configure the values or configure a ValueProvider of these
Dual-Value design-time properties.
Note That if the author selects to use a ValueProvider for any one of these design-time properties, this will create a set of nested child design-time properties as well (and this can recurse as more descendants are configured through descendant ValueProviders).
This mechanism is well supported all over the pattern model, and the sites this will occur in the PatternModel is expected to increase as we add more automation features over time.
However, if the author changes the automation type (i.e. of the Command, LaunchPoint, ValueProvider, Condition etc) a new set of design-time properties are persisted alongside the current set of design-time properties that represented the previous automation
type. The previous set of design-time properties are no longer part of the definition of the current automation type and are now 'orphaned' from their orginal automation type.
These orphaned design-time properties will remain persisted and will build-up noise over time as the Pattern Model is refactored. These orpahned design-time properties will not be removed automatically.
Add code that removes orphaned design-time propertires when the Pattern Model is persisted, or when the automation type is changed.
This mechanism needs to be implemented in one place in the code related to design-time properties as a general purpose cleanup mechanism, so that it is not duplicated all over the codebase.