Class BulkObservableCollection<T>
- Namespace
- McServerLauncher.ViewModels
- Assembly
- McServerLauncher.dll
ObservableCollection with bulk operations that raise a single Reset event instead of one CollectionChanged per element. Used by the console lists (EFI-4): a verbose server (e.g. Forge booting) used to pay one RemoveAt(0) — an O(n) array shift plus a UI notification — for every line beyond the cap; trimming in blocks makes that a single cheap Reset every couple hundred lines, which the virtualized ListBox absorbs by re-rendering only the visible viewport.
public sealed class BulkObservableCollection<T> : ObservableCollection<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Type Parameters
T
- Inheritance
-
Collection<T>BulkObservableCollection<T>
- Implements
-
IList<T>ICollection<T>IEnumerable<T>
- Inherited Members
Methods
RemoveFromStart(int)
Removes the first count items, raising one Reset.
public void RemoveFromStart(int count)
Parameters
countint
ReplaceAll(IEnumerable<T>)
Replaces the whole content with items, raising one Reset.
public void ReplaceAll(IEnumerable<T> items)
Parameters
itemsIEnumerable<T>