This repository was archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
CollectionExtensions
Mark Smith edited this page Aug 29, 2016
·
1 revision
This is a set of extension methods on top of IList
, IEnumerable
and ICollection
types.
-
ToGroupedObservable
- takes aGroupBy
result and turns it into aGroupedObservableCollection<TKey,TValue>
. -
ToObservableCollection
- takes anIEnumerable
set and returns anObservableCollection<T>
. -
BubbleSort
- sorts anIList<T>
using the Bubble Sort algorithm. Two variations are supplied - one takes anIComparer
and the other takes aFunc<T,T,int>
to do the comparison. -
Compare
- compares two collections and returns whether they have the same set included with (optionally) the same ordering. -
AddRange
- adds a range ofIEnumerable
items to aICollection
. -
RemoveRange
- removes a range ofIEnumerable
items to aICollection
. -
IndexOf
- returns the index position of a given item in anIEnumerable
using aPredicate<T>
as the test. -
Swap
- swaps two values in anIList<T>
based on index. -
MoveRange
- moves a section of aIList<T>
from one position in the list to another, supports overlapping regions.