Example #1
0
        /// <summary>
        /// Add a new upstream handler
        /// </summary>
        /// <param name="handler">Handler to add</param>
        /// <remarks>Upstream handlers takes care of everything sent from the channel to the client.</remarks>
        public void AddUpstreamHandler(IUpstreamHandler handler)
        {
            var ctx  = new PipelineUpstreamContext(this, handler);
            var last = _upstreamContexts.Last;

            if (last != null)
            {
                _logger.Debug("Added upstream handler " + handler + " and linked it as next handler for " + last.Value);
                last.Value.NextHandler = ctx;
            }
            else
            {
                _logger.Debug("Added upstream handler " + handler);
            }


            _upstreamContexts.AddLast(ctx);
        }
        /// <summary>
        /// Add a new upstream handler 
        /// </summary>
        /// <param name="handler">Handler to add</param>
        /// <remarks>Upstream handlers takes care of everything sent from the channel to the client.</remarks>
        public void AddUpstreamHandler(IUpstreamHandler handler)
        {
            var ctx = new PipelineUpstreamContext(this, handler);
            var last = _upstreamContexts.Last;
            if (last != null)
            {
                _logger.Debug("Added upstream handler " + handler + " and linked it as next handler for " + last.Value);
                last.Value.NextHandler = ctx;
            }
            else
            {
                _logger.Debug("Added upstream handler " + handler);
            }


            _upstreamContexts.AddLast(ctx);
        }