Opened 11 years ago
Last modified 10 years ago
#2241 closed defect
ItemsRemoved event uses Items instead of OldItems to store removed items — at Initial Version
Reported by: | abeham | Owned by: | |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.11 |
Component: | General | Version: | 3.3.10 |
Keywords: | Cc: |
Description
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 subscription if the Items and OldItems property would be used consistently.