Example #1
0
        public void InvokeReceivePhysicalMessagePipeline()
        {
            var context = contextStacker.Current as ReceivePhysicalMessageContext;

            if (context == null)
            {
                throw new InvalidOperationException("Can't invoke the receive pipeline when the current context is: " + contextStacker.Current.GetType().Name);
            }


            var pipeline = new BehaviorChain <ReceivePhysicalMessageContext>(pipelineBuilder.receivePhysicalMessageBehaviorList);


            pipeline.Invoke(context);
        }
Example #2
0
        public void InvokePipeline <TContext>(IEnumerable <Type> behaviours, TContext context) where TContext : BehaviorContext
        {
            var pipeline = new BehaviorChain <TContext>(behaviours);

            Execute(pipeline, context);
        }
Example #3
0
        /// <summary>
        ///     Invokes a chain of behaviors.
        /// </summary>
        /// <typeparam name="TContext">The context to use.</typeparam>
        /// <param name="behaviors">The behaviors to execute in the specified order.</param>
        /// <param name="context">The context instance.</param>
        public void InvokePipeline <TContext>(IEnumerable <Type> behaviors, TContext context) where TContext : BehaviorContext
        {
            var pipeline = new BehaviorChain <TContext>(behaviors, context, this, busNotifications);

            Execute(pipeline, context);
        }