/// <summary>
 /// Generates an async-enumerable sequence that repeats the given element the specified number of times.
 /// </summary>
 /// <typeparam name="TResult">The type of the element that will be repeated in the produced sequence.</typeparam>
 /// <param name="element">Element to repeat.</param>
 /// <param name="count">Number of times to repeat the element.</param>
 /// <returns>An async-enumerable sequence that repeats the given element the specified number of times.</returns>
 /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="count" /> is less than zero.</exception>
 public static IAsyncEnumerable <TResult> Repeat <TResult>(
     TResult element,
     int count)
 {
     return(AsyncEnumerable.Repeat(element, count));
 }
Esempio n. 2
0
 public static IAsyncEnumerable <TResult> Repeat <TResult>(TResult element, int count) =>
 LinqEnumerable.Repeat(element, count);