Cysharp / ObservableCollections

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

[ObservableLookup] implementation #52

Closed xperiandri closed 3 months ago

xperiandri commented 4 months ago

I need an ObservableLookup which implements ILookup<TKey, TValue> interface? Can I contribute it or will you implement it?

neuecc commented 4 months ago

I think ILookup is readonly so no observable.

xperiandri commented 4 months ago

Even though it is read-only our lookup class can be mutable. The main point is that it has to work like an ObservableDictionary storing ObservableCollections as values

neuecc commented 4 months ago

Value changes not be monitoring other types either.

xperiandri commented 4 months ago

I have not gotten your point

xperiandri commented 4 months ago

This is what I implemented

https://github.com/Ecierge/Elmish.Uno/tree/eCierge/src/Elmish.ObservableLookup

from this as a source

https://github.com/xamarin/Xamarin.PropertyEditing/blob/972186e6ddd68566375da7bc336e566196f44307/Xamarin.PropertyEditing/ObservableLookup.cs

xperiandri commented 4 months ago

Can we port that to you?

xperiandri commented 4 months ago

What do you think?

neuecc commented 4 months ago

From what I see, you are still adding a mutable type called IMutableLookup, right?

xperiandri commented 4 months ago

In my sample, I do. However, it is not mandatory

xperiandri commented 3 months ago

Any thoughts?

neuecc commented 3 months ago

not positive.