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>(GraphInterpreter.UpstreamBoundaryStageLogic upstream, Inlet <T> inlet) { _upstreams.Add(new Tuple <GraphInterpreter.UpstreamBoundaryStageLogic, Inlet>(upstream, inlet)); return(this); }