Exemplo n.º 1
0
 /// <summary>
 ///     Runs multiple async sources at once and relays items, in order, from each
 ///     one after the previous async source terminates.
 /// </summary>
 /// <typeparam name="TSource">The element type of the sources and result.</typeparam>
 /// <param name="maxConcurrency">The maximum number of inner async sources to run at once.</param>
 /// <param name="prefetch">The number of items to prefetch from each inner source.</param>
 /// <param name="sources">The params array of sources to run at once but concatenate in order.</param>
 /// <returns>The new IAsyncEnumerable sequence.</returns>
 public static IAsyncEnumerable <TSource> ConcatEager <TSource>(
     this IAsyncEnumerable <IAsyncEnumerable <TSource> > sources, int maxConcurrency = 32, int prefetch = 32)
 {
     return(sources.ConcatMapEager(v => v, maxConcurrency, prefetch));
 }