public Sorter(SortOptimisations optimisations, IComparer <TObject> comparer = null, int resetThreshold = -1) { _optimisations = optimisations; _resetThreshold = resetThreshold; _comparer = new KeyValueComparer <TObject, TKey>(comparer); }
/// <summary> /// Sorts all data using the specified comparer /// </summary> /// <param name="comparer">The comparer.</param> /// <returns></returns> public ISortedChangeSet <TObject, TKey> Sort(IComparer <TObject> comparer) { _comparer = new KeyValueComparer <TObject, TKey>(comparer); return(DoSort(SortReason.ComparerChanged)); }
public IChangeSet <TObject, TKey> ChangeComparer(KeyValueComparer <TObject, TKey> comparer) { _comparer = comparer; return(ChangeSet <TObject, TKey> .Empty); }
public KeyValueCollection() { Optimisations = SortOptimisations.None; _items = new List <KeyValuePair <TKey, TObject> >(); Comparer = new KeyValueComparer <TObject, TKey>(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public IndexCalculator(KeyValueComparer <TObject, TKey> comparer, SortOptimisations optimisations) { _comparer = comparer; _optimisations = optimisations; _list = new List <KeyValuePair <TKey, TObject> >(); }