|
|
@@ -37,6 +37,17 @@ namespace System.Linq
|
|
|
|
|
|
if (_index >= 0)
|
|
|
{
|
|
|
+#if CSHARP8 && AETOR_HAS_CT // CS0656 Missing compiler required member 'System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator'
|
|
|
+ await foreach (TSource item in _source.WithCancellation(_cancellationToken).ConfigureAwait(false))
|
|
|
+ {
|
|
|
+ if (_index == 0)
|
|
|
+ {
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+
|
|
|
+ _index--;
|
|
|
+ }
|
|
|
+#else
|
|
|
var e = _source.GetAsyncEnumerator(_cancellationToken);
|
|
|
|
|
|
try
|
|
|
@@ -55,6 +66,7 @@ namespace System.Linq
|
|
|
{
|
|
|
await e.DisposeAsync().ConfigureAwait(false);
|
|
|
}
|
|
|
+#endif
|
|
|
}
|
|
|
}
|
|
|
|