Cysharp / ObservableCollections

High performance observable collections and synchronized views, for WPF, Blazor, Unity.
MIT License
602 stars 46 forks source link

Requests when used in combination with R3 #44

Closed TORISOUP closed 3 months ago

TORISOUP commented 5 months ago

I have two requests.

1. readonly-observable-Dictionary

The IReadonlyReactiveDictionary that existed in UniRx was easy to use, so we request a function equivalent to it. If I tried to handle the current ObservableDictionary Readonly, I would have to divide it into two parts, IReadonlyDictionary and IObservableCollection<KeyValuePair>, which is not easy to handle.

2. Publish OnCompleteMessage from IObservableCollection.

When dealing with IObservableCollection in R3, I feel uncomfortable that it is not possible to unsubscribe from the collection side. For example, could it be possible to make IObservableCollection inherit IDisposable and issue OnCompleted on Dispose()?

neuecc commented 3 months ago

When the CancellationToken of each subscription method (ObserveAdd, etc...) of R3Extensions is canceled, OnCompleted will be issued. This is the same behavior as R3's Observable.Timer, etc.