Browse Source

Some stylistic consistency.

Bart De Smet 7 years ago
parent
commit
9f00d59e69

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

@@ -15,9 +15,7 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> DefaultIfEmpty<TSource>(this IAsyncEnumerable<TSource> source, TSource defaultValue)
         {
             if (source == null)
-            {
                 throw Error.ArgumentNull(nameof(source));
-            }
 
             return new DefaultIfEmptyAsyncIterator<TSource>(source, defaultValue);
         }
@@ -25,9 +23,7 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> DefaultIfEmpty<TSource>(this IAsyncEnumerable<TSource> source)
         {
             if (source == null)
-            {
                 throw Error.ArgumentNull(nameof(source));
-            }
 
             return DefaultIfEmpty(source, default);
         }

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

@@ -15,9 +15,7 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> Reverse<TSource>(this IAsyncEnumerable<TSource> source)
         {
             if (source == null)
-            {
                 throw Error.ArgumentNull(nameof(source));
-            }
 
             return new ReverseAsyncIterator<TSource>(source);
         }

+ 0 - 26
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs

@@ -13,19 +13,11 @@ namespace System.Linq
         public static Task<bool> SequenceEqual<TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
         {
             if (first == null)
-            {
                 throw Error.ArgumentNull(nameof(first));
-            }
-
             if (second == null)
-            {
                 throw Error.ArgumentNull(nameof(second));
-            }
-
             if (comparer == null)
-            {
                 throw Error.ArgumentNull(nameof(comparer));
-            }
 
             return SequenceEqual(first, second, comparer, CancellationToken.None);
         }
@@ -33,14 +25,9 @@ namespace System.Linq
         public static Task<bool> SequenceEqual<TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second)
         {
             if (first == null)
-            {
                 throw Error.ArgumentNull(nameof(first));
-            }
-
             if (second == null)
-            {
                 throw Error.ArgumentNull(nameof(second));
-            }
 
             return SequenceEqual(first, second, CancellationToken.None);
         }
@@ -49,19 +36,11 @@ namespace System.Linq
         public static Task<bool> SequenceEqual<TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource> comparer, CancellationToken cancellationToken)
         {
             if (first == null)
-            {
                 throw Error.ArgumentNull(nameof(first));
-            }
-
             if (second == null)
-            {
                 throw Error.ArgumentNull(nameof(second));
-            }
-
             if (comparer == null)
-            {
                 throw Error.ArgumentNull(nameof(comparer));
-            }
 
             return SequenceEqualCore(first, second, comparer, cancellationToken);
         }
@@ -69,14 +48,9 @@ namespace System.Linq
         public static Task<bool> SequenceEqual<TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, CancellationToken cancellationToken)
         {
             if (first == null)
-            {
                 throw Error.ArgumentNull(nameof(first));
-            }
-
             if (second == null)
-            {
                 throw Error.ArgumentNull(nameof(second));
-            }
 
             return first.SequenceEqual(second, EqualityComparer<TSource>.Default, cancellationToken);
         }

+ 0 - 10
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs

@@ -14,14 +14,9 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> Where<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate)
         {
             if (source == null)
-            {
                 throw Error.ArgumentNull(nameof(source));
-            }
-
             if (predicate == null)
-            {
                 throw Error.ArgumentNull(nameof(predicate));
-            }
 
             if (source is AsyncIterator<TSource> iterator)
             {
@@ -35,14 +30,9 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> Where<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, bool> predicate)
         {
             if (source == null)
-            {
                 throw Error.ArgumentNull(nameof(source));
-            }
-
             if (predicate == null)
-            {
                 throw Error.ArgumentNull(nameof(predicate));
-            }
 
             return new WhereEnumerableWithIndexAsyncIterator<TSource>(source, predicate);
         }