Ejemplo n.º 1
0
        /// <summary>
        /// 添加下个一管道
        /// </summary>
        /// <param name="newHandler"></param>
        /// <returns></returns>
        public OutputPipeLine <TInput, TOutput> AddHandler(OutputHandler <TInput, TOutput> newHandler)
        {
            var currentHandle = _currentHandler;

            while (currentHandle != null)
            {
                if (currentHandle.Next == null)
                {
                    currentHandle.Next = newHandler;
                    break;
                }

                currentHandle = currentHandle.Next;
            }

            return(this);
        }
Ejemplo n.º 2
0
 public OutputPipeLine(OutputHandler <TInput, TOutput> currentHandler)
 {
     _currentHandler = currentHandler;
 }