Exemplo n.º 1
0
 /// <summary>
 /// Creates a Source using an Async function's result as input,
 /// Flattening an enumerable out to a stream of individual elements
 /// The Async function is evaluated once per each materialization
 /// </summary>
 /// <param name="func">The Async function producing a value</param>
 public static Source <TElem, NotUsed> FromEnumerable(
     Func <Task <IEnumerable <TElem> > > func)
 {
     return(AsyncSource.FromEnumerable(func));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a Source using an Async function's result as input,
 /// Flattening an enumerable out to a stream of individual elements
 /// The Async function is evaluated once per each materialization
 /// </summary>
 /// <param name="state">The input state passed to the async function</param>
 /// <param name="func">The Async function producing a value</param>
 public static Source <TElem, NotUsed> FromEnumerable <TState>(TState state,
                                                               Func <TState, Task <IEnumerable <TElem> > > func)
 {
     return(AsyncSource.FromEnumerable <TState, TElem>(state, func));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a Source using an Async function's result as input
 /// The Async function is evaluated once per each materialization
 /// </summary>
 /// <param name="func">The Async function producing a value</param>
 /// <returns></returns>
 public static Source <TElem, NotUsed> From(Func <Task <TElem> > func)
 {
     return(AsyncSource.From(func));
 }