public MessagePipelineBuilder Pipeline(string pipelineName) { var builder = new MessagePipelineBuilder(pipelineName); _messagePipelineBuilders.Add(builder); return(builder); }
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); }))); }
public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Action <Message> action) { return(AddHandler(builder, (msg, pipelineName, index) => action(msg))); }
public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, Task <MessageHandlerResults> > asyncFunc) { return(builder.AddHandler(new GenericMessageHandler((msg, pipelineName, index) => asyncFunc(msg)))); }
public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, string, int, Task <MessageHandlerResults> > asyncFunc) { return(builder.AddHandler(new GenericMessageHandler(asyncFunc))); }