Add IObservableCollection to the Core #191

Closed
alexshikov opened this Issue Mar 16, 2013 · 7 comments

Comments

Projects
None yet
3 participants
Contributor

alexshikov commented Mar 16, 2013

This is a proposal.
How about to add IObservableCollection and SimpleObservableImplementation to the Core?
Have an implementation (for methods, AddRange, RemoveRange and Sort), but not sure about Pull Request.

Contributor

slodge commented Mar 16, 2013

Please excuse the ignorance...

  • What is IObservableCollection?
  • How is SimpleObsImpl different to ObservableCollection?

Stuart

Contributor

alexshikov commented Mar 16, 2013

Sorry, for lack-information.

The goal of the interface is to provide AddRange, RemoveRange methods.
So that the notification about changes raises only once (when all items added/removed).

    public interface IObservableCollection<T>
        : IList<T>
        , INotifyCollectionChanged
    {
        void AddRange(IEnumerable<T> items);
        void RemoveRange(IEnumerable<T> items);
        void Sort(IComparer<T> comparer);
    }
Contributor

slodge commented Mar 16, 2013

Build it first - then maybe/maybe not add it to the core.

Since Mvx would only interact with this via IList and INotifyCollectionChanged, then I think this sort of code can be added as a separate assembly - so it can go in SeeDLib ?

I think adding IObservableCollection to the core is a good proposal.

Contributor

slodge commented Mar 25, 2013

Just to be clear... I'd still love to see this as a sample.

Whether it then makes it into the core or whether it sits on the outside, depends on how useful it is and whether people would rather have it as a 'plugin' rather than as part of the core :)

Contributor

alexshikov commented Apr 1, 2013

Added Pull-Request (see #212).
Decided to remove interface, so there is only implementation left: MvxObservableCollection.
Was unable to launch samples out-of-the-box for VeeTree, so the code is added to vNext.
Please, let me know if pull-request incorrect.

Contributor

slodge commented Apr 10, 2013

Closing this - as moved to #212

@slodge slodge closed this Apr 19, 2013

martijn00 pushed a commit to martijn00/MvvmCross that referenced this issue Dec 8, 2016

Merge pull request #191 from GMCristiano/master
Fix bug when  Android does auto memory management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment