public ExtendedSortedSet(IEnumerable <T> collection, IComparer <T> comparer = null, IEqualityComparer <T> equalityComparer = null) { this.comparer = new WrappedComparer(comparer, equalityComparer) { insertMode = InsertMode.OldFirst, }; sortedSet = new SortedSet <T>( collection != null ? new WrappedEnumereable(this.comparer, collection) as IEnumerable <T> : EmptyCollection <T> .Default, this.comparer); }
public WrappedEnumerator(WrappedComparer wrappedComparer, IEnumerator <T> baseEnumerator) { this.wrappedComparer = wrappedComparer; this.baseEnumerator = baseEnumerator; }
public WrappedEnumereable(WrappedComparer wrappedComparer, IEnumerable <T> baseEnumerable) { this.wrappedComparer = wrappedComparer; this.baseEnumerable = baseEnumerable; }