/// <inheritdoc /> public virtual void Configure(IServiceConfigurator configurator) { foreach (var serviceSpecification in _serviceSpecifications) { _log.Info($"Configuring Service: {serviceSpecification.GetType().GetTypeName()}"); serviceSpecification.Configure(configurator); } foreach (var specification in _endpointSpecifications) { var queueName = specification.QueueName; var consumerLimit = specification.ConsumerLimit; _log.Info($"Configuring Endpoint: {specification.GetType().GetTypeName()} (queue-name: {queueName}, consumer-limit: {consumerLimit})"); configurator.ReceiveEndpoint(queueName, consumerLimit, x => { specification.Configure(x); _log.Info($"Configured Endpoint: {specification.GetType().GetTypeName()} (address: {x.InputAddress})"); }); } foreach (var observer in _busObservers) { _log.Info($"Configuring Bus Observer: {observer.GetType().GetTypeName()}"); configurator.BusObserver(observer); } }
void ConfigureBusObservers(IServiceConfigurator configurator) { var observers = _lifetimeScope.ResolveOptional <IEnumerable <IBusObserver> >(); if (observers != null) { foreach (var observer in observers) { configurator.BusObserver(observer); } } }
void ConfigureBusObservers(IServiceConfigurator configurator) { var observers = _lifetimeScope.ResolveOptional<IEnumerable<IBusObserver>>(); if (observers != null) { foreach (var observer in observers) { _log.Info($"Configuring Bus Observer: {observer.GetType().GetTypeName()}"); configurator.BusObserver(observer); } } }
void ConfigureBusObservers(IServiceConfigurator configurator) { var observers = _lifetimeScope.ResolveOptional <IEnumerable <IBusObserver> >(); if (observers != null) { foreach (var observer in observers) { _log.Info($"Configuring Bus Observer: {observer.GetType().GetTypeName()}"); configurator.BusObserver(observer); } } }