/// <summary> /// Initializes a new instance of the <see cref="SourceEqualityComparerBase{T,TSource}"/> class. /// </summary> /// <param name="source">The source comparer. If this is <c>null</c>, the default comparer is used.</param> /// <param name="specialNullHandling">A value indicating whether <c>null</c> values are passed to <see cref="EqualityComparerBase{T}.DoGetHashCode"/> and <see cref="EqualityComparerBase{T}.DoEquals"/>. If <c>false</c>, then <c>null</c> values are considered not equal to any non-<c>null</c> values and are not passed to <see cref="EqualityComparerBase{T}.DoGetHashCode"/> nor <see cref="EqualityComparerBase{T}.DoEquals"/>.</param> protected SourceEqualityComparerBase(IEqualityComparer <TSource> source, bool specialNullHandling) : base(specialNullHandling) { _source = EqualityComparerHelpers.NormalizeDefault(source); }
/// <summary> /// Initializes a new instance of the <see cref="CompoundEqualityComparer<T>"/> 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 CompoundEqualityComparer(IEqualityComparer <T>?source, IEqualityComparer <T>?secondSource) : base(source, true) { _secondSource = EqualityComparerHelpers.NormalizeDefault(secondSource); }