/RangedObservableCollection

A small extension to ObservableCollection that allows for multiple items to be added, removed or replaced in a single operation.

Primary LanguageC#MIT LicenseMIT

RangedObservableCollection

Build status NuGet NuGet Pre Release

A small extension to ObservableCollection that allows for multiple items to be added, removed or replaced in a single operation.

RangedObservableCollection

A small extension to ObservableCollection that allows for multiple items to be added, removed or replaced in a single operation.

This library is simple and just adds a few extra methods:

var collection = new RangedObservableCollection<int>();

// bulk add
var itemsToAdd = new [] { 1, 2, 3, 4, 5 };
collection.AddRange(itemsToAdd);

// bulk remove
var itemsToRemove = new [] { 1, 2, 3, 4, 5 };
collection.RemoveRange(itemsToRemove);

// bulk clear and add
var itemsToReplace = new [] { 1, 2, 3, 4, 5 };
collection.ReplaceRange(itemsToReplace);