Ejemplo n.º 1
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.º 2
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.º 3
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, string, int, Task <MessageHandlerResults> > asyncFunc)
 {
     return(builder.AddHandler(new GenericMessageHandler(asyncFunc)));
 }