コード例 #1
0
 internal PublisherConcatMap(IPublisher <T> source, Func <T, IPublisher <R> > mapper,
                             int prefetch, ConcatErrorMode errorMode)
 {
     this.source    = source;
     this.mapper    = mapper;
     this.prefetch  = prefetch;
     this.errorMode = errorMode;
 }
コード例 #2
0
 /// <summary>
 /// Generates and concatenates Publishers on each 'rail', optionally delaying errors
 /// and using the given prefetch amount for generating IPublishers upfront.
 /// </summary>
 /// <typeparam name="T">the value type</typeparam>
 /// <typeparam name="R">The result type</typeparam>
 /// <param name="source">The source IParallelPublisher instance.</param>
 /// <param name="mapper">the function to map each rail's value into a IPublisher</param>
 /// <param name="prefetch">the number of items to prefetch from each inner IPublisher</param>
 /// <param name="errorMode">the error handling, i.e., when to report errors from the main
 /// source and the inner Publishers (immediate, boundary, end)</param>
 /// <returns>The new IParallelFlux instance</returns>
 public static IParallelFlux <R> ConcatMap <T, R>(this IParallelFlux <T> source, Func <T, IPublisher <R> > mapper, int prefetch, ConcatErrorMode errorMode = ConcatErrorMode.Immediate)
 {
     // TODO implement ConcatMap
     throw new NotImplementedException();
 }
コード例 #3
0
 /// <summary>
 /// Generates and concatenates Publishers on each 'rail', signalling errors immediately
 /// and using the given prefetch amount for generating Publishers upfront.
 /// </summary>
 /// <typeparam name="T">the value type</typeparam>
 /// <typeparam name="R">The result type</typeparam>
 /// <param name="source">The source IParallelPublisher instance.</param>
 /// <param name="mapper">the function to map each rail's value into a IPublisher</param>
 /// <param name="errorMode">the error handling, i.e., when to report errors from the main
 /// source and the inner Publishers (immediate, boundary, end)</param>
 /// <returns>The new IParallelFlux instance</returns>
 public static IParallelFlux <R> ConcatMap <T, R>(this IParallelFlux <T> source, Func <T, IPublisher <R> > mapper, ConcatErrorMode errorMode = ConcatErrorMode.Immediate)
 {
     return(ConcatMap(source, mapper, 2, errorMode));
 }