Skip to content

Commit

Permalink
Also mark Event Adapter as likely unfeasible
Browse files Browse the repository at this point in the history
  • Loading branch information
terrajobst committed Aug 7, 2024
1 parent 4d4f3ed commit 99e93c7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions accepted/2024/observable_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,21 @@ exceptions.
- Pro: Core API is simple while providing an affordance to the user to solve
the problem without requiring changes from the UI framework.
- Con: More complex state, might not play well with WPF's `CollectionView`.
- > [!NOTE]
> Doesn't seem feasible. Handlers of the event likely assume the collection
> was just changed to include the one modification. Just translating the
> event would mean they get a series of events but the handler sees the
> final collection in all invocations.
* ~~**Event enumerator**. We could expose a method on
* **Event enumerator**. We could expose a method on
`NotifyCollectionChangedEventArgs` that returns an
`IEnumerable<NotifyCollectionChangedEventArgs>`. For single item events it
returns itself, otherwise it creates a new event arg per item. This requires
UI controls to make code changes if they don't support bulk notifications, but
the change is fairly targeted.~~
- ~~Pro: Simple API~~
- ~~Con: Still breaks consumers, just provides an easier path to adapt to the
new behavior without having to fully support bulk notifications.~~
the change is fairly targeted.
- Pro: Simple API
- Con: Still breaks consumers, just provides an easier path to adapt to the
new behavior without having to fully support bulk notifications.
- > [!NOTE]
> Doesn't seem feasible. Handlers of the event likely assume the collection
> was just changed to include the one modification. Just translating the
Expand Down

0 comments on commit 99e93c7

Please sign in to comment.