/// <summary>
        /// Find next async processor in chain.
        /// </summary>
        /// <param name="el"></param>
        /// <returns></returns>
        public static ProcessingElement NextAsyncProcessor(ProcessingElement el)
        {
            if (el == null || el is Collector)
            {
                return(null);
            }

            return(el.IsAsync ? el : NextAsyncProcessor(el.Next));
        }
예제 #2
0
        public override ProcessingElement Clone(ProcessingElement previous)
        {
            var np = new Collector
            {
                Carrier              = Carrier,
                ConcreteObject       = ConcreteObject,
                ErrorProcessorMethod = ErrorProcessorMethod,
                IsAsync              = IsAsync,
                Method   = Method,
                Name     = Name,
                Previous = previous
            };

            np.Next = Next?.Clone(np);
            return(np);
        }
        public virtual ProcessingElement Clone(ProcessingElement previous)
        {
            var cloned = new ProcessingElement
            {
                Name    = Name,
                IsAsync = IsAsync,
                ErrorProcessorMethod = ErrorProcessorMethod,
                Carrier        = Carrier,
                ConcreteObject = ConcreteObject,
                Method         = ErrorProcessorMethod,
                Previous       = previous
            };

            cloned.Next = Next?.Clone(cloned);

            return(cloned);
        }