public MessagePipelineBuilder Pipeline(string pipelineName)
        {
            var builder = new MessagePipelineBuilder(pipelineName);

            _messagePipelineBuilders.Add(builder);

            return(builder);
        }
Ejemplo n.º 2
0
        public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Action <Message, string, int> action)
        {
            return(builder.AddHandler(new GenericMessageHandler((msg, pipelineName, index) =>
            {
                action(msg, pipelineName, index);

                return Task.FromResult(MessageHandlerResults.Success);
            })));
        }
Ejemplo n.º 3
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Action <Message> action)
 {
     return(AddHandler(builder, (msg, pipelineName, index) => action(msg)));
 }
Ejemplo n.º 4
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, Task <MessageHandlerResults> > asyncFunc)
 {
     return(builder.AddHandler(new GenericMessageHandler((msg, pipelineName, index) => asyncFunc(msg))));
 }
Ejemplo n.º 5
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, string, int, Task <MessageHandlerResults> > asyncFunc)
 {
     return(builder.AddHandler(new GenericMessageHandler(asyncFunc)));
 }