예제 #1
0
 public PipeLineStage(CancellationToken token, int workers, int bufferSize, IEnumerable <TSource> sources,
                      Func <TSource, IEnumerable <TResult> > filter) : this(token, workers, bufferSize)
 {
     manyFilter = filter;
     BuildSource(sources);
     Mode = PipeLineStageMode.SelectMany;
 }
예제 #2
0
 public PipeLineStage(CancellationToken token, int workers, int bufferSize, BlockingCollection <TSource> sources,
                      Action <TSource> action) : this(token, workers, bufferSize)
 {
     outputAction = action ?? (s => Console.WriteLine(s));
     Sources      = sources;
     Mode         = PipeLineStageMode.Last;
 }
예제 #3
0
 public PipeLineStage(CancellationToken token, int workers, int bufferSize, BlockingCollection <TSource> sources,
                      Func <TSource, TResult> filter,
                      Action <TSource> outputAction) : this(token, workers, bufferSize)
 {
     Sources           = sources;
     this.filter       = filter;
     this.outputAction = outputAction;
     Mode = PipeLineStageMode.Select;
 }