public IBusControl CreateBus()
        {
            var builder = new InMemoryBusBuilder(InMemoryHost, SendTransportProvider, _hosts, _configuration);

            ApplySpecifications(builder);

            return(builder.Build());
        }
Пример #2
0
        public IBusControl CreateBus()
        {
            var builder = new InMemoryBusBuilder(InMemoryHost, SendTransportProvider, _hosts, ConsumePipeFactory, SendPipeFactory, PublishPipeFactory);

            ApplySpecifications(builder);

            return(builder.Build());
        }
Пример #3
0
        public IBusControl CreateBus()
        {
            if (_inMemoryHost == null || _sendTransportProvider == null)
            {
                var transportProvider = new InMemoryHost(_concurrencyLimit);
                _hosts.Add(transportProvider);

                _inMemoryHost          = _inMemoryHost ?? transportProvider;
                _sendTransportProvider = _sendTransportProvider ?? transportProvider;
            }

            var builder = new InMemoryBusBuilder(_inMemoryHost, _sendTransportProvider, _hosts, ConsumePipeFactory, SendPipeFactory, PublishPipeFactory);

            ApplySpecifications(builder);

            return(builder.Build());
        }
Пример #4
0
        public IBusControl CreateBus()
        {
            if (_receiveTransportProvider == null || _sendTransportProvider == null)
            {
                var transportProvider = new InMemoryTransportCache(_concurrencyLimit);
                _hosts.Add(transportProvider);

                _receiveTransportProvider = _receiveTransportProvider ?? transportProvider;
                _sendTransportProvider    = _sendTransportProvider ?? transportProvider;
            }

            var builder = new InMemoryBusBuilder(_receiveTransportProvider, _sendTransportProvider, _hosts.ToArray(), ConsumePipeFactory, SendPipeFactory, PublishPipeFactory);

            foreach (var configurator in _configurators)
            {
                configurator.Apply(builder);
            }

            return(builder.Build());
        }
        public IBusControl CreateBus()
        {
            if (_receiveTransportProvider == null || _sendTransportProvider == null)
            {
                var transportProvider = new InMemoryTransportCache(_concurrencyLimit);
                _hosts.Add(transportProvider);

                _receiveTransportProvider = _receiveTransportProvider ?? transportProvider;
                _sendTransportProvider    = _sendTransportProvider ?? transportProvider;
            }

            var builder = new InMemoryBusBuilder(_receiveTransportProvider, _sendTransportProvider, _hosts, _consumePipeSpecification);

            foreach (IInMemoryBusFactorySpecification configurator in _configurators)
            {
                configurator.Apply(builder);
            }

            return(builder.Build());
        }