/// <summary>
 /// Initializes a new instance of the <see cref="CompoundComparer&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="source">The source comparer. If this is <c>null</c>, the default comparer is used.</param>
 /// <param name="secondSource">The second comparer. If this is <c>null</c>, the default comparer is used.</param>
 public CompoundComparer(IComparer <T> source, IComparer <T> secondSource)
     : base(source, true)
 {
     this.secondSource_ = ComparerHelpers.NormalizeDefault(secondSource);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SourceComparerBase&lt;T, TSource&gt;"/> class.
 /// </summary>
 /// <param name="source">The source comparer. If this is <c>null</c>, the default comparer is used.</param>
 /// <param name="allowNulls">A value indicating whether <c>null</c> values are passed to <see cref="EqualityComparerBase{T}.DoGetHashCode"/> and <see cref="ComparerBase{T}.DoCompare"/>. If <c>false</c>, then <c>null</c> values are considered less than any non-<c>null</c> values and are not passed to <see cref="EqualityComparerBase{T}.DoGetHashCode"/> nor <see cref="ComparerBase{T}.DoCompare"/>.</param>
 protected SourceComparerBase(IComparer <TSource> source, bool allowNulls)
     : base(allowNulls)
 {
     this.source_ = ComparerHelpers.NormalizeDefault(source);
 }