コード例 #1
0
        public MessagePipelineBuilder Pipeline(string pipelineName)
        {
            var builder = new MessagePipelineBuilder(pipelineName);

            _messagePipelineBuilders.Add(builder);

            return(builder);
        }
コード例 #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);
            })));
        }
コード例 #3
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Action <Message> action)
 {
     return(AddHandler(builder, (msg, pipelineName, index) => action(msg)));
 }
コード例 #4
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, Task <MessageHandlerResults> > asyncFunc)
 {
     return(builder.AddHandler(new GenericMessageHandler((msg, pipelineName, index) => asyncFunc(msg))));
 }
コード例 #5
0
 public static MessagePipelineBuilder AddHandler(this MessagePipelineBuilder builder, Func <Message, string, int, Task <MessageHandlerResults> > asyncFunc)
 {
     return(builder.AddHandler(new GenericMessageHandler(asyncFunc)));
 }