public static Incomplete <T> StartWith <T>(Action <PipelineSink <T> > sourceAction) { PipelineCoordinator coordinator = new PipelineCoordinator(); PipelineSink <T> sink = new PipelineSink <T>(coordinator); coordinator.AddInitialAction(() => sourceAction(sink)); return(new Incomplete <T>(sink, coordinator)); }
private static void Main(string[] args) { var pipeline = PipelineCoordinator.StartWith <int>(ProduceItems) .Then <int>(FilterItems) .Then <string>(TransformItems) .EndWith(DumpItems); pipeline.Start(); }
internal PipelineSink(PipelineCoordinator coordinator) { this.coordinator = coordinator; }
internal Incomplete(PipelineSink <T> currentSink, PipelineCoordinator coordinator) { this.currentSink = currentSink; this.coordinator = coordinator; }
public PipelineSource(PipelineCoordinator coordinator) { this.coordinator = coordinator; }