Код: Выделить всё
public static async IAsyncEnumerable AsAsyncEnumerable(this IEnumerable tasks)
{
foreach (Task task in tasks)
{
yield return await task;
}
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... numerablet
Код: Выделить всё
public static async IAsyncEnumerable AsAsyncEnumerable(this IEnumerable tasks)
{
foreach (Task task in tasks)
{
yield return await task;
}
}