示例#1
0
        public void Configure(IReceiveEndpointBuilder builder)
        {
            _pipeConfigurator.AddPipeSpecification(_handlerConfigurator);

            IPipe <ConsumeContext <TMessage> > pipe = _pipeConfigurator.Build();

            builder.ConnectConsumePipe(pipe);
        }
示例#2
0
        public void Configure(IReceiveEndpointBuilder builder)
        {
            IPipe <RequestContext> executeActivityPipe = _pipeSpecifications.Build(new ExecuteActivityFilter <TActivity, TArguments>());

            _routingSlipConfigurator.UseFilter(_filterFactory(executeActivityPipe));

            builder.ConnectConsumePipe(_routingSlipConfigurator.Build());
        }
示例#3
0
        public void Configure(IReceiveEndpointBuilder builder)
        {
            IPipe <RequestContext> compensateActivityPipe = _pipeSpecifications.Build(new CompensateActivityFilter <TActivity, TLog>());

            IPipe <ConsumeContext <RoutingSlip> > messagePipe = Pipe.New <ConsumeContext <RoutingSlip> >(x =>
            {
                x.UseFilter(_filterFactory(compensateActivityPipe));
            });

            builder.ConnectConsumePipe(messagePipe);
        }
示例#4
0
        public void Configure(IReceiveEndpointBuilder builder)
        {
            _observers.All(observer =>
            {
                observer.HandlerConfigured(this);
                return(true);
            });

            _pipeConfigurator.AddPipeSpecification(_handlerConfigurator);

            IPipe <ConsumeContext <TMessage> > pipe = _pipeConfigurator.Build();

            builder.ConnectConsumePipe(pipe);
        }
示例#5
0
        public void Configure(IReceiveEndpointBuilder builder)
        {
            _activityPipeConfigurator.UseFilter(new ExecuteActivityFilter <TActivity, TArguments>(_observers));

            IPipe <ExecuteActivityContext <TActivity, TArguments> > executeActivityPipe = _activityPipeConfigurator.Build();

            _executePipeConfigurator.UseFilter(new ExecuteActivityFactoryFilter <TActivity, TArguments>(_activityFactory, executeActivityPipe));

            IPipe <ExecuteContext <TArguments> > executePipe = _executePipeConfigurator.Build();

            var host = new ExecuteActivityHost <TActivity, TArguments>(executePipe, _compensateAddress);

            _routingSlipConfigurator.UseFilter(host);

            builder.ConnectConsumePipe(_routingSlipConfigurator.Build());
        }
示例#6
0
        public void Configure(IReceiveEndpointBuilder builder)
        {
            _activityPipeConfigurator.UseFilter(new CompensateActivityFilter <TActivity, TLog>(_observers));

            IPipe <CompensateActivityContext <TActivity, TLog> > compensateActivityPipe = _activityPipeConfigurator.Build();

            _compensatePipeConfigurator.UseFilter(new CompensateActivityFactoryFilter <TActivity, TLog>(_activityFactory, compensateActivityPipe));

            IPipe <CompensateContext <TLog> > compensatePipe = _compensatePipeConfigurator.Build();

            var host = new CompensateActivityHost <TActivity, TLog>(compensatePipe);

            _routingSlipConfigurator.UseFilter(host);

            builder.ConnectConsumePipe(_routingSlipConfigurator.Build());
        }
        public void Configure(IReceiveEndpointBuilder builder)
        {
            var builders = new ConsumerPipeBuilder <RoutingSlip>();

            for (int i = 0; i < _pipeSpecifications.Count; i++)
            {
                _pipeSpecifications[i].Apply(builders);
            }

            IPipe <ConsumeContext <RoutingSlip> > messagePipe = Pipe.New <ConsumeContext <RoutingSlip> >(x =>
            {
                foreach (var filter in builders.Filters)
                {
                    x.UseFilter(filter);
                }

                x.UseFilter(_filterFactory());
            });

            builder.ConnectConsumePipe(messagePipe);
        }