ItemsRemoved event should use OldItems
|Reported by:||abeham||Owned by:|
|Priority:||medium||Milestone:||HeuristicLab 4.x Backlog|
For most of our observable collections one has to subscribe to 4 events (ItemsAdded, ItemsReplaced, ItemsRemoved, and CollectionReset) to get notified of any change to the collection. Because of the reuse and generic design of the common event argument type it seems as if it was possible to handle these with one event handler. Unfortunately, ItemsRemoved is the exception in that it uses the Items property and not the OldItems property of the event argument to store the removed items.
It should be evaluated if the design could be improved, e.g. these events could be unified to one event and thus requiring only one handler implementation if the Items and OldItems property would be used consistently.
Change History (3)
comment:1 Changed 2 years ago by abeham
- Milestone changed from HeuristicLab 3.3.11 to HeuristicLab 3.3.12
comment:2 Changed 21 months ago by ascheibe
- Milestone changed from HeuristicLab 3.3.12 to HeuristicLab 3.3.13
- Type changed from task to enhancement