Browse Source

Fix USE_ASYNC_ITERATOR build.

Bart De Smet 6 years ago
parent
commit
e11f6aed52

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

@@ -4,6 +4,7 @@
 
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Threading;
 using System.Threading.Tasks;
 
 namespace System.Linq

+ 3 - 3
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs

@@ -41,7 +41,7 @@ namespace System.Linq
                         {
                             var item = e.Current;
                             var outerKey = outerKeySelector(item);
-                            yield return resultSelector(item, lookup[outerKey]);
+                            yield return resultSelector(item, lookup[outerKey].ToAsyncEnumerable());
                         }
                         while (await e.MoveNextAsync());
                     }
@@ -83,7 +83,7 @@ namespace System.Linq
                         {
                             var item = e.Current;
                             var outerKey = await outerKeySelector(item).ConfigureAwait(false);
-                            yield return await resultSelector(item, lookup[outerKey]).ConfigureAwait(false);
+                            yield return await resultSelector(item, lookup[outerKey].ToAsyncEnumerable()).ConfigureAwait(false);
                         }
                         while (await e.MoveNextAsync());
                     }
@@ -126,7 +126,7 @@ namespace System.Linq
                         {
                             var item = e.Current;
                             var outerKey = await outerKeySelector(item, cancellationToken).ConfigureAwait(false);
-                            yield return await resultSelector(item, lookup[outerKey], cancellationToken).ConfigureAwait(false);
+                            yield return await resultSelector(item, lookup[outerKey].ToAsyncEnumerable(), cancellationToken).ConfigureAwait(false);
                         }
                         while (await e.MoveNextAsync());
                     }

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

@@ -4,6 +4,7 @@
 
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Threading;
 using System.Threading.Tasks;
 
 namespace System.Linq

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

@@ -98,7 +98,7 @@ namespace System.Linq
                         index++;
                     }
 
-                    var inner = selector(element, index);
+                    var inner = await selector(element, index).ConfigureAwait(false);
 
                     await foreach (var subElement in inner.WithCancellation(cancellationToken).ConfigureAwait(false))
                     {

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

@@ -4,6 +4,7 @@
 
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Threading;
 using System.Threading.Tasks;
 
 namespace System.Linq

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

@@ -4,6 +4,7 @@
 
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Threading;
 using System.Threading.Tasks;
 
 namespace System.Linq