Cysharp / ObservableCollections

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

[ObservableLookup] implementation #52

Closed xperiandri closed 1 month ago

xperiandri commented 3 months ago

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

neuecc commented 3 months ago

I think ILookup is readonly so no observable.

xperiandri commented 3 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 3 months ago

Value changes not be monitoring other types either.

xperiandri commented 3 months ago

I have not gotten your point

xperiandri commented 2 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 2 months ago

Can we port that to you?

xperiandri commented 2 months ago

What do you think?

neuecc commented 2 months ago

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

xperiandri commented 2 months ago

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

xperiandri commented 1 month ago

Any thoughts?

neuecc commented 1 month ago

not positive.