public IBusControl Build()
        {
            try
            {
                IConsumePipe busConsumePipe = CreateBusReceiveEndpoint();

                return(new MassTransitBus(_inputAddress, busConsumePipe, SendEndpointProvider, PublishEndpoint, ReceiveEndpoints, _hosts, BusObservable));
            }
            catch (Exception exception)
            {
                TaskUtil.Await(() => BusObservable.CreateFaulted(exception));

                throw;
            }
        }
        public IBusControl Build()
        {
            try
            {
                _busEndpointConfigurator.Apply(this);

                return(new MassTransitBus(_busEndpointConfigurator.InputAddress, _busConsumePipe, SendEndpointProvider, PublishEndpoint, ReceiveEndpoints, _hosts, BusObservable));
            }
            catch (Exception exception)
            {
                TaskUtil.Await(() => BusObservable.CreateFaulted(exception));

                throw;
            }
        }
Esempio n. 3
0
        public IBusControl Build()
        {
            try
            {
                PreBuild();

                var bus = new MassTransitBus(InputAddress, ConsumePipe, SendEndpointProvider, PublishEndpointProvider, _hosts, BusObservable);

                TaskUtil.Await(() => _busObservable.PostCreate(bus));

                return(bus);
            }
            catch (Exception exception)
            {
                TaskUtil.Await(() => BusObservable.CreateFaulted(exception));

                throw;
            }
        }
Esempio n. 4
0
        public IBusControl Build()
        {
            try
            {
                _busEndpointSpecification.Apply(this);

                var bus = new MassTransitBus(_busEndpointConfiguration.InputAddress, _busEndpointConfiguration.ConsumePipe, _busEndpointSpecification.SendEndpointProvider,
                                             _busEndpointSpecification.PublishEndpointProvider, _configuration.Hosts, _busObservable);

                TaskUtil.Await(() => _busObservable.PostCreate(bus));

                return(bus);
            }
            catch (Exception exception)
            {
                TaskUtil.Await(() => _busObservable.CreateFaulted(exception));

                throw;
            }
        }