RangeObservableCollection<T>
Class in Oadm.Sdk.Client.Collections · Oadm.Sdk.Client.dll
ObservableCollection<T> with bulk operations that raise a single NotifyCollectionChangedAction.Reset instead of one event per item. Scale: adding, filtering or selecting 5,000 rows one by one raises 5,000 events, and every DataGrid, filter and summary bound to the collection reacts to each of them.
public class RangeObservableCollection<T> : ObservableCollection<T>, IResettableListInherits ObservableCollection<T>
Implements IResettableList
Guide: UI kit
Constructors
Section titled “Constructors”RangeObservableCollection
Section titled “RangeObservableCollection”RangeObservableCollection()An empty collection.
RangeObservableCollection
Section titled “RangeObservableCollection”RangeObservableCollection(IEnumerable<T> items)A collection with items.
Methods
Section titled “Methods”AddRange
Section titled “AddRange”void AddRange(IEnumerable<T> items)Appends items; one Add event for a single item, else one Reset.
InsertRange
Section titled “InsertRange”void InsertRange(int index, IEnumerable<T> items)Inserts items at index in their order; one Add event for a single item, else one Reset.
RemoveAll
Section titled “RemoveAll”int RemoveAll(Predicate<T> match)Removes every item matching match in O(n); one Remove event for a single item, else one Reset. Returns the number removed.
RemoveFirst
Section titled “RemoveFirst”void RemoveFirst(int count)Removes the first count items (e.g. the oldest of a capped log); one Remove event for a single item, else one Reset.
ReplaceAll
Section titled “ReplaceAll”void ReplaceAll(IEnumerable<T> items)Replaces the whole content; one Reset. Nothing happens when the content is the same.