public GraphInterpreter Build(GraphInterpreter.UpstreamBoundaryStageLogic upstream, GraphStage <FlowShape <T, T> >[] ops, GraphInterpreter.DownstreamBoundaryStageLogic downstream) { var b = Builder(ops).Connect(upstream, ops[0].Shape.Inlet); for (var i = 0; i < ops.Length - 1; i++) { b.Connect(ops[i].Shape.Outlet, ops[i + 1].Shape.Inlet); } b.Connect(ops[ops.Length - 1].Shape.Outlet, downstream); b.Init(); return(Interpreter); }
public AssemblyBuilder Connect <T>(Outlet <T> outlet, GraphInterpreter.DownstreamBoundaryStageLogic downstream) { _downstreams.Add(new Tuple <Outlet, GraphInterpreter.DownstreamBoundaryStageLogic>(outlet, downstream)); return(this); }