Procházet zdrojové kódy

Allow null for comparer.

Bart De Smet před 6 roky
rodič
revize
2678bde660

+ 0 - 2
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Distinct.cs

@@ -50,8 +50,6 @@ namespace System.Linq
                 throw Error.ArgumentNull(nameof(source));
             if (keySelector == null)
                 throw Error.ArgumentNull(nameof(keySelector));
-            if (comparer == null)
-                throw Error.ArgumentNull(nameof(comparer));
 
             return DistinctCore(source, keySelector, comparer);
         }

+ 0 - 4
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/DistinctUntilChanged.cs

@@ -75,8 +75,6 @@ namespace System.Linq
                 throw Error.ArgumentNull(nameof(source));
             if (keySelector == null)
                 throw Error.ArgumentNull(nameof(keySelector));
-            if (comparer == null)
-                throw Error.ArgumentNull(nameof(comparer));
 
             return DistinctUntilChangedCore(source, keySelector, comparer);
         }
@@ -88,8 +86,6 @@ namespace System.Linq
                 throw Error.ArgumentNull(nameof(source));
             if (keySelector == null)
                 throw Error.ArgumentNull(nameof(keySelector));
-            if (comparer == null)
-                throw Error.ArgumentNull(nameof(comparer));
 
             return DistinctUntilChangedCore(source, keySelector, comparer);
         }