예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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));
        }
예제 #5
0
        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));
        }
예제 #6
0
        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));
        }
예제 #7
0
        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));
        }
예제 #8
0
        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));
        }
예제 #9
0
 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);
 }