ListPool
ListPool copied to clipboard
ListPool.Sort
Very cool project, we like it a lot.
Only thing that we're kind of missing are the sort methods
public void Sort(Comparison<T> comparison);
public void Sort(int index, int count, IComparer<T> comparer);
public void Sort();
public void Sort(IComparer<T> comparer);
I think it would be as simple as
public void Sort() => Sort(0, Count, null);
public void Sort(IComparer<T> comparer) => Sort(0, Count, comparer);
public void Sort(int index, int count, IComparer<T> comparer) => Array.Sort<T>(_items, index, count, comparer);
public void Sort(Comparison<T> comparison) => Array.Sort<T>(_items, 0, Count, Comparer<T>.Create(comparison));