Beispiel #1
0
        /// <summary>
        /// 基础流体
        /// </summary>
        public Pipeline(string pipeCode, BaseInPipePart <TIn> startPipe,
                        IPipeAppender <TOut> endPipeAppender, PipeLineOption option) : base(pipeCode, PipeType.Pipeline)
        {
            if (startPipe == null || endPipeAppender == null || string.IsNullOrEmpty(pipeCode))
            {
                throw new ArgumentNullException("未发现流体的起始截止管道和管道编码!");
            }

            PipeCode   = pipeCode;
            _startPipe = startPipe;
            _endPipe   = endPipeAppender;

            InitialPipes();

            if (option?.Watcher != null)
            {
                WatchProxy = new PipeWatcherProxy(option.Watcher, option.WatcherDataFlowKey,
                                                  option.WatcherDataFlowOption);
            }

            startPipe.InterInitialContainer(this);
        }
Beispiel #2
0
 /// <summary>
 /// 根据首位两个管道建立流体
 /// </summary>
 /// <typeparam name="TIn"></typeparam>
 /// <typeparam name="TOut"></typeparam>
 /// <param name="startPipe"></param>
 /// <param name="endPipe"></param>
 /// <param name="flowPipeCode"></param>
 /// <param name="option"></param>
 /// <returns></returns>
 public static EmptyEntryPipeline <TEndOut> AsPipeline <TEndIn, TEndPara, TEndResult, TEndOut>(this BaseInPipePart <Empty> startPipe,
                                                                                               BaseFourWayPipe <TEndIn, TEndPara, TEndResult, TEndOut> endPipe,
                                                                                               string flowPipeCode, PipeLineOption option = null)
 {
     return(new EmptyEntryPipeline <TEndOut>(flowPipeCode, startPipe, endPipe, option));
 }
 /// <inheritdoc />
 public EmptyEntryPipeline(string pipeCode, BaseInPipePart <Empty> startPipe, IPipeAppender <TContext> endPipeAppender, PipeLineOption option)
     : base(pipeCode, startPipe, endPipeAppender, option)
 {
 }