Ejemplo n.º 1
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            var testActivity   = GetActivityContext <TestActivity>();
            var secondActivity = GetActivityContext <SecondTestActivity>();

            _requestProxy  = new RequestProxy(testActivity, secondActivity);
            _responseProxy = new ResponseProxy();

            configurator.Instance(_requestProxy);
            configurator.Instance(_responseProxy);

            _requestAddress = configurator.InputAddress;
        }
Ejemplo n.º 2
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInMemoryReceiveEndpoint(configurator);

            _consumer = new MixedConsumer(GetTask <A>(), GetTask <B>());

            configurator.Instance(_consumer);
        }
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _consumer = new OneMessageConsumer(GetTask<MessageA>());

            object instance = _consumer;

            configurator.Instance(instance);
        }
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _consumer = new OneMessageConsumer(GetTask <MessageA>());

            object instance = _consumer;

            configurator.Instance(instance);
        }
Ejemplo n.º 5
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _consumer = new MyConsumer(GetTask <PingMessage>());

            _message         = GetTask <PingMessage>();
            _consumerOnly    = GetTask <MyConsumer>();
            _consumerMessage = GetTask <Tuple <MyConsumer, PingMessage> >();

            configurator.Instance(_consumer, cfg =>
            {
                cfg.UseExecute(context => _consumerOnly.TrySetResult(context.Consumer));
                cfg.Message <PingMessage>(m => m.UseExecute(context => _message.TrySetResult(context.Message)));
                cfg.ConsumerMessage <PingMessage>(m => m.UseExecute(context => _consumerMessage.TrySetResult(Tuple.Create(context.Consumer, context.Message))));
            });
        }
Ejemplo n.º 6
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _consumer = new MyConsumer(GetTask <Message>());

            configurator.Instance(_consumer);
        }
Ejemplo n.º 7
0
 protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
 {
     _consumer = new Consumer();
     configurator.Instance(_consumer);
 }