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; }
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; }
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; }