Esempio n. 1
0
        protected override void OnReplace(BulkUpdateableCollection <T> collection, IReadOnlyList <T> items)
        {
            collection.Clear();

            foreach (var e in items)
            {
                collection.Items.Add(e);
            }

            collection.OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, items as IList ?? items.ToList(), 0));
        }
Esempio n. 2
0
        protected virtual void OnReplace(BulkUpdateableCollection <T> collection, IReadOnlyList <T> items)
        {
            if (TryInsert(collection, items) ||
                TryRemove(collection, items))
            {
                return;
            }

            collection.Clear();

            foreach (var e in items)
            {
                collection.Add(e);
            }
        }
Esempio n. 3
0
 protected override void OnClear(BulkUpdateableCollection <T> collection)
 {
     collection.Clear();
     collection.OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
 }
Esempio n. 4
0
 protected virtual void OnClear(BulkUpdateableCollection <T> collection)
 => collection.Clear();