Esempio n. 1
0
 /// <summary>
 /// Collects the elements of an IAsyncEnumerator into a regular enumerable synchronously.
 /// <returns></returns>
 public static IProducerConsumerCollection <T> CollectSync <T>(this IAsyncEnumerator <T> e, int maxCount = 0)
 {
     return(e.Collect(maxCount: maxCount).GetAwaiter().GetResult());
 }