public ReversibleSortedList(SortDirectionComparer <TKey> comparer) : this() { if (comparer != null) { this._sortDirectionComparer = comparer; this._currentSortDirection = _sortDirectionComparer.SortDirection; } }
public ReversibleSortedList(IDictionary <TKey, TValue> dictionary, SortDirectionComparer <TKey> comparer) : this((dictionary != null) ? dictionary.Count : 0, comparer) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } dictionary.Keys.CopyTo(this.keys, 0); dictionary.Values.CopyTo(this.values, 0); Array.Sort <TKey, TValue>(this.keys, this.values, this._sortDirectionComparer); this._size = dictionary.Count; }
public ReversibleSortedList(int capacity, SortDirectionComparer <TKey> comparer) : this(comparer) { this.Capacity = capacity; }