Returns an equality comparer that calls IHasEquivalence.IsEquivalentTo.
public static IEqualityComparer<T> GetEqualityComparerOrFallback<T>()
parameter | description |
---|---|
T | The object type. |
The equality comparer.
If T does not implement IHasEquivalence{T}, this method returns EqualityComparer{T}.Default as a fallback instead.
Returns an equality comparer that calls IHasEquivalence.IsEquivalentTo.
public static IEqualityComparer<T> GetEqualityComparerOrFallback<T>(IEqualityComparer<T> fallback)
parameter | description |
---|---|
T | The object type. |
The equality comparer.
If T does not implement IHasEquivalence{T}, this method returns the specified fallback instead.