Пример #1
0
        public MessageProcessingBehaviourPipeline Build(IServiceProvider provider)
        {
            var pipeline = new MessageProcessingBehaviourPipeline();

            foreach (var messagePipelineBehaviourType in _messagePipelineBehaviourTypes)
            {
                pipeline.AddBehaviour((IMessageProcessingBehaviour)provider.GetService(messagePipelineBehaviourType));
            }
            return(pipeline);
        }
Пример #2
0
        public MessageProcessingBehaviourPipeline Build(IContext ctx)
        {
            var pipeline = new MessageProcessingBehaviourPipeline();

            foreach (var messagePipelineBehaviourType in _messagePipelineBehaviourTypes)
            {
                pipeline.AddBehaviour((IMessageProcessingBehaviour)ctx.GetInstance(messagePipelineBehaviourType));
            }
            return(pipeline);
        }
Пример #3
0
 public static MessageProcessingBehaviourPipeline AddBehaviour <T>(this MessageProcessingBehaviourPipeline pipleline, IContext context) where T : IMessageProcessingBehaviour
 {
     return(pipleline.AddBehaviour(context.GetInstance <T>()));
 }
Пример #4
0
 public static MessageProcessingBehaviourPipeline AddBehaviour <T>(this MessageProcessingBehaviourPipeline pipleline, IServiceProvider provider) where T : IMessageProcessingBehaviour
 {
     return(pipleline.AddBehaviour(provider.GetService <T>()));
 }