|
|
@@ -84,6 +84,12 @@ namespace System.Linq
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+#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))
|
|
|
+ {
|
|
|
+ list.Add(item);
|
|
|
+ }
|
|
|
+#else
|
|
|
var e = source.GetAsyncEnumerator(cancellationToken);
|
|
|
|
|
|
try
|
|
|
@@ -97,6 +103,7 @@ namespace System.Linq
|
|
|
{
|
|
|
await e.DisposeAsync().ConfigureAwait(false);
|
|
|
}
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
return list;
|