public Incomplete <TResult> Then <TResult>(Action <PipelineSource <T>, PipelineSink <TResult> > connector) { PipelineSource <T> source = new PipelineSource <T>(coordinator); currentSink.AttachSource(source); PipelineSink <TResult> newSink = new PipelineSink <TResult>(coordinator); coordinator.AddInitialAction(() => connector(source, newSink)); return(new Incomplete <TResult>(newSink, coordinator)); }
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)); }