Skip to content

MyNihongo/LinqAsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version NuGet downloads
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()