nadako / TinkStateSharp

Handle those pesky states, now in C#
https://nadako.github.io/TinkStateSharp/
The Unlicense
40 stars 1 forks source link

Support observing collections like an `Observable<read-only-collection>` #5

Closed nadako closed 1 year ago

nadako commented 1 year ago

Observable collections like ObservableList and ObservableDictionary need some love.

Firstly, we want to have read-only interfaces so you can pass them to the readers without the ability to modify them.

Secondly, it would be nice to have e.g. ObservableList also behave like an Observable<IReadOnlyList> or something, so you can bind to it like a normal observable.

nadako commented 1 year ago

Gotta make an effort to implement this, as I feel actual need for it in my own project. The current "workaround" is having an Observable.Auto(() => new List<Item>(observableList)), but that's obviously wasteful and verbose.