Browse Source

Some code cosmetics.

Bart De Smet 7 years ago
parent
commit
536438d7b9

+ 0 - 13
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Buffer.cs

@@ -14,14 +14,9 @@ namespace System.Linq
         public static IAsyncEnumerable<IList<TSource>> Buffer<TSource>(this IAsyncEnumerable<TSource> source, int count)
         {
             if (source == null)
-            {
                 throw new ArgumentNullException(nameof(source));
-            }
-
             if (count <= 0)
-            {
                 throw new ArgumentOutOfRangeException(nameof(count));
-            }
 
             return new BufferAsyncIterator<TSource>(source, count, count);
         }
@@ -29,19 +24,11 @@ namespace System.Linq
         public static IAsyncEnumerable<IList<TSource>> Buffer<TSource>(this IAsyncEnumerable<TSource> source, int count, int skip)
         {
             if (source == null)
-            {
                 throw new ArgumentNullException(nameof(source));
-            }
-
             if (count <= 0)
-            {
                 throw new ArgumentOutOfRangeException(nameof(count));
-            }
-
             if (skip <= 0)
-            {
                 throw new ArgumentOutOfRangeException(nameof(skip));
-            }
 
             return new BufferAsyncIterator<TSource>(source, count, skip);
         }

+ 0 - 8
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Generate.cs

@@ -14,19 +14,11 @@ namespace System.Linq
         public static IAsyncEnumerable<TResult> Generate<TState, TResult>(TState initialState, Func<TState, bool> condition, Func<TState, TState> iterate, Func<TState, TResult> resultSelector)
         {
             if (condition == null)
-            {
                 throw new ArgumentNullException(nameof(condition));
-            }
-
             if (iterate == null)
-            {
                 throw new ArgumentNullException(nameof(iterate));
-            }
-
             if (resultSelector == null)
-            {
                 throw new ArgumentNullException(nameof(resultSelector));
-            }
 
             return new GenerateAsyncIterator<TState, TResult>(initialState, condition, iterate, resultSelector);
         }

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

@@ -14,9 +14,7 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> IgnoreElements<TSource>(this IAsyncEnumerable<TSource> source)
         {
             if (source == null)
-            {
                 throw new ArgumentNullException(nameof(source));
-            }
 
             return new IgnoreElementsAsyncIterator<TSource>(source);
         }

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

@@ -11,9 +11,7 @@ namespace System.Linq
         public static IAsyncEnumerable<TSource> StartWith<TSource>(this IAsyncEnumerable<TSource> source, params TSource[] values)
         {
             if (source == null)
-            {
                 throw new ArgumentNullException(nameof(source));
-            }
 
             return values.ToAsyncEnumerable().Concat(source);
         }