LINQ extension methods for Task<IEnumerable<T>>
and ValueTask<IEnumerable<T>>
.
var enumerableTask = Task.FromResult(new [] { 1, 2, 3, 4, 5});
var newEnumerable = await enumerableTask
.Select(x => x * 2)
.ToImmutableArrayAsync();
Available extensions:
- ToArrayAsync(), ToImmutableArrayAsync()
- ToListAsync(), ToImmutableListAsync()
- ToLookupAsync()
- ToHashSetAsync(), ToImmutableHashSetAsync()
- ToDictionaryAsync()
- Select(), SelectMany()