public OrderedSortedSet([NotNull] IEnumerable <T> source, IComparer <T>?comparer) { if (source is null) { throw new ArgumentNullException(nameof(source)); } source = source.Materialize(); Inner = new OrderedComparer <T>(source, comparer); Set = new FixedSortedSet <T>(source, Inner); }
public OrderedSortedSet(IComparer <T>?comparer) { Inner = new OrderedComparer <T>(comparer); Set = new FixedSortedSet <T>((IComparer <T>)Inner); }