Selaa lähdekoodia

Merge branch 'master' of https://github.com/dotnet/reactive into NullableReferenceTypes

Bart De Smet 6 vuotta sitten
vanhempi
sitoutus
46f5123be7

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

@@ -3,7 +3,6 @@
 // See the LICENSE file in the project root for more information. 
 
 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;
 

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

@@ -3,7 +3,6 @@
 // See the LICENSE file in the project root for more information. 
 
 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;
 

+ 7 - 7
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs

@@ -364,11 +364,11 @@ namespace System.Linq
 
                 return Core(cancellationToken);
 
-                async ValueTask<int> Core(CancellationToken _cancellationToken)
+                async ValueTask<int> Core(CancellationToken cancellationToken)
                 {
                     var count = 0;
 
-                    await foreach (var element in _source.WithCancellation(_cancellationToken).ConfigureAwait(false))
+                    await foreach (var element in _source.WithCancellation(cancellationToken).ConfigureAwait(false))
                     {
                         checked
                         {
@@ -503,11 +503,11 @@ namespace System.Linq
 
                 return Core(cancellationToken);
 
-                async ValueTask<int> Core(CancellationToken _cancellationToken)
+                async ValueTask<int> Core(CancellationToken cancellationToken)
                 {
                     var count = 0;
 
-                    await foreach (var element in _source.WithCancellation(_cancellationToken).ConfigureAwait(false))
+                    await foreach (var element in _source.WithCancellation(cancellationToken).ConfigureAwait(false))
                     {
                         var items = await _selector(element).ConfigureAwait(false);
 
@@ -645,13 +645,13 @@ namespace System.Linq
 
                 return Core(cancellationToken);
 
-                async ValueTask<int> Core(CancellationToken _cancellationToken)
+                async ValueTask<int> Core(CancellationToken cancellationToken)
                 {
                     var count = 0;
 
-                    await foreach (var element in _source.WithCancellation(_cancellationToken).ConfigureAwait(false))
+                    await foreach (var element in _source.WithCancellation(cancellationToken).ConfigureAwait(false))
                     {
-                        var items = await _selector(element, _cancellationToken).ConfigureAwait(false);
+                        var items = await _selector(element, cancellationToken).ConfigureAwait(false);
 
                         checked
                         {

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

@@ -20,10 +20,7 @@ namespace System.Linq
             if (second == null)
                 throw Error.ArgumentNull(nameof(second));
 
-            if (comparer == null)
-            {
-                comparer = EqualityComparer<TSource>.Default;
-            }
+            comparer ??= EqualityComparer<TSource>.Default;
 
             if (first is ICollection<TSource> firstCol && second is ICollection<TSource> secondCol)
             {

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

@@ -3,7 +3,6 @@
 // See the LICENSE file in the project root for more information. 
 
 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;
 

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

@@ -3,7 +3,6 @@
 // See the LICENSE file in the project root for more information. 
 
 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;