public MessageProcessingBehaviourPipeline Build(IServiceProvider provider) { var pipeline = new MessageProcessingBehaviourPipeline(); foreach (var messagePipelineBehaviourType in _messagePipelineBehaviourTypes) { pipeline.AddBehaviour((IMessageProcessingBehaviour)provider.GetService(messagePipelineBehaviourType)); } return(pipeline); }
public MessageProcessingBehaviourPipeline Build(IContext ctx) { var pipeline = new MessageProcessingBehaviourPipeline(); foreach (var messagePipelineBehaviourType in _messagePipelineBehaviourTypes) { pipeline.AddBehaviour((IMessageProcessingBehaviour)ctx.GetInstance(messagePipelineBehaviourType)); } return(pipeline); }
public static MessageProcessingBehaviourPipeline AddBehaviour <T>(this MessageProcessingBehaviourPipeline pipleline, IContext context) where T : IMessageProcessingBehaviour { return(pipleline.AddBehaviour(context.GetInstance <T>())); }
public static MessageProcessingBehaviourPipeline AddBehaviour <T>(this MessageProcessingBehaviourPipeline pipleline, IServiceProvider provider) where T : IMessageProcessingBehaviour { return(pipleline.AddBehaviour(provider.GetService <T>())); }