/// <summary> /// TBD /// </summary> /// <typeparam name="TIn">TBD</typeparam> /// <typeparam name="TOut">TBD</typeparam> /// <typeparam name="TMat">TBD</typeparam> /// <param name="ops">TBD</param> /// <param name="sink">TBD</param> /// <returns>TBD</returns> public static GraphDsl.Builder <TMat> To <TIn, TOut, TMat>(this GraphDsl.ForwardOps <TOut, TMat> ops, SinkShape <TIn> sink) where TIn : TOut { var b = ops.Builder; b.AddEdge(ops.Out, sink.Inlet); return(b); }
/// <summary> /// TBD /// </summary> /// <typeparam name="TIn">TBD</typeparam> /// <typeparam name="TOut">TBD</typeparam> /// <typeparam name="TMat">TBD</typeparam> /// <param name="ops">TBD</param> /// <param name="flow">TBD</param> /// <returns>TBD</returns> public static GraphDsl.Builder <TMat> To <TIn, TOut, TMat>(this GraphDsl.ForwardOps <TOut, TMat> ops, FlowShape <TIn, TOut> flow) where TIn : TOut { var b = ops.Builder; b.AddEdge(ops.Out, flow.Inlet); return(b); }
public static GraphDsl.Builder <TMat> To <TIn, TOut1, TOut2, TMat>(this GraphDsl.ForwardOps <TOut1, TMat> ops, UniformFanInShape <TIn, TOut2> junction) where TIn : TOut1 { var b = ops.Builder; var inlet = GraphDsl.FindIn(b, junction, 0); b.AddEdge(ops.Out, inlet); return(b); }
public static GraphDsl.Builder <TMat> To <TIn, TOut1, TOut2, TMat>(this GraphDsl.ForwardOps <TOut1, TMat> ops, UniformFanOutShape <TIn, TOut2> junction) where TIn : TOut1 { var b = ops.Builder; if (!b.Module.Upstreams.ContainsKey(junction.In)) { b.AddEdge(ops.Out, junction.In); return(b); } throw new ArgumentException("No more inlets free on junction", nameof(junction)); }
public static GraphDsl.ForwardOps <TOut2, TMat> Via <TIn, TOut1, TOut2, TMat>(this GraphDsl.ForwardOps <TOut1, TMat> ops, UniformFanOutShape <TIn, TOut2> junction) where TIn : TOut1 { var outlet = Bind(ops, junction); return(ops.Builder.From(outlet)); }
public static GraphDsl.ForwardOps <TOut2, TMat> Via <TIn, TOut1, TOut2, TMat>(this GraphDsl.ForwardOps <TOut1, TMat> ops, UniformFanInShape <TIn, TOut2> junction) where TIn : TOut1 { var b = To(ops, junction); return(b.From(junction.Out)); }
public static GraphDsl.ForwardOps <TOut2, TMat> Via <TIn, TOut1, TOut2, TMat>(this GraphDsl.ForwardOps <TOut1, TMat> ops, IGraph <FlowShape <TIn, TOut2>, NotUsed> flow) where TIn : TOut1 { var b = ops.Builder; var s = b.Add(flow); b.AddEdge(ops.Out, s.Inlet); return(new GraphDsl.ForwardOps <TOut2, TMat>(b, s.Outlet)); }
public static GraphDsl.ForwardOps <TOut2, TMat> Via <TIn, TOut1, TOut2, TMat>(this GraphDsl.ForwardOps <TOut1, TMat> ops, FlowShape <TIn, TOut2> flow) where TIn : TOut1 { var b = ops.Builder; b.AddEdge(ops.Out, flow.Inlet); return(new GraphDsl.ForwardOps <TOut2, TMat>(b, flow.Outlet)); }
public static GraphDsl.Builder <TMat> To <TIn, TOut, TMat>(this GraphDsl.ForwardOps <TOut, TMat> ops, Inlet <TIn> inlet) where TIn : TOut { ops.Builder.AddEdge(ops.Out, inlet); return(ops.Builder); }