Exemple #1
0
        public static IMessageProcessingPipeBuilder UseConfigurableClientDispatcher(this IMessageProcessingPipeBuilder builder,
                                                                                    Func <ISimpleMessageHandlingConfigBuilder, ISimpleMessageHandlingConfigBuilder> configure)
        {
            var config = new MessageHandlingConfigBuilder();
            var mp     = new DispatchingMessageProcessor(configure(config).Build(), false);

            return(builder.Use(next => context => mp.Process(next, context)));
        }
Exemple #2
0
        public static IMessageProcessingPipeBuilder UseConfigurableDispatcher(this IMessageProcessingPipeBuilder builder, Func <IMessageHandlingConfigBuilder, IMessageHandlingConfigBuilder> configure,
                                                                              bool throwIfUnhandled = true)
        {
            var config = new MessageHandlingConfigBuilder();
            var mp     = new DispatchingMessageProcessor(configure(config).Build(), throwIfUnhandled);

            return(builder.Use(next => context => mp.Process(next, context)));
        }