瀏覽代碼

Named parameter cosmetics.

Bart De Smet 7 年之前
父節點
當前提交
daba4d8755

+ 5 - 6
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs

@@ -134,8 +134,7 @@ namespace System.Linq
 
                         if (_enumerator != null)
                         {
-                            if (await LoadFromEnumeratorAsync()
-                                .ConfigureAwait(false))
+                            if (await LoadFromEnumeratorAsync().ConfigureAwait(false))
                             {
                                 return true;
                             }
@@ -180,7 +179,7 @@ namespace System.Linq
 
             public override async Task<TSource[]> ToArrayAsync(CancellationToken cancellationToken)
             {
-                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken: cancellationToken).ConfigureAwait(false);
+                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken).ConfigureAwait(false);
                 if (count == -1)
                 {
                     return await AsyncEnumerableHelpers.ToArray(this, cancellationToken).ConfigureAwait(false);
@@ -230,7 +229,7 @@ namespace System.Linq
 
             public override async Task<List<TSource>> ToListAsync(CancellationToken cancellationToken)
             {
-                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken: cancellationToken).ConfigureAwait(false);
+                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken).ConfigureAwait(false);
                 var list = count == -1 ? new List<TSource>() : new List<TSource>(count);
 
                 if (!_appending)
@@ -389,7 +388,7 @@ namespace System.Linq
 
             public override async Task<TSource[]> ToArrayAsync(CancellationToken cancellationToken)
             {
-                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken: cancellationToken).ConfigureAwait(false);
+                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken).ConfigureAwait(false);
                 if (count == -1)
                 {
                     return await AsyncEnumerableHelpers.ToArray(this, cancellationToken).ConfigureAwait(false);
@@ -437,7 +436,7 @@ namespace System.Linq
 
             public override async Task<List<TSource>> ToListAsync(CancellationToken cancellationToken)
             {
-                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken: cancellationToken).ConfigureAwait(false);
+                var count = await GetCountAsync(onlyIfCheap: true, cancellationToken).ConfigureAwait(false);
                 var list = count == -1 ? new List<TSource>() : new List<TSource>(count);
                 for (var n = _prepended; n != null; n = n.Linked)
                 {

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

@@ -124,7 +124,7 @@ namespace System.Linq
                 else
                 {
                     var listProv = _source as IAsyncIListProvider<TSource>;
-                    count = listProv == null ? -1 : await listProv.GetCountAsync(onlyIfCheap: true, cancellationToken: cancellationToken).ConfigureAwait(false);
+                    count = listProv == null ? -1 : await listProv.GetCountAsync(onlyIfCheap: true, cancellationToken).ConfigureAwait(false);
                 }
 
                 return count == 0 ? 1 : count;