public async Task<IStartableEndpoint> Initialize() { RegisterCriticalErrorHandler(); var concreteTypes = settings.GetAvailableTypes() .Where(IsConcrete) .ToList(); WireUpConfigSectionOverrides(concreteTypes); var featureActivator = BuildFeatureActivator(concreteTypes); ConfigRunBeforeIsFinalized(concreteTypes); var transportDefinition = settings.Get<TransportDefinition>(); var connectionString = settings.Get<TransportConnectionString>().GetConnectionStringOrRaiseError(transportDefinition); var transportInfrastructure = transportDefinition.Initialize(settings, connectionString); settings.Set<TransportInfrastructure>(transportInfrastructure); var featureStats = featureActivator.SetupFeatures(container, pipelineSettings); pipelineConfiguration.RegisterBehaviorsInContainer(settings, container); DisplayDiagnosticsForFeatures.Run(featureStats); container.ConfigureComponent(b => settings.Get<Notifications>(), DependencyLifecycle.SingleInstance); await RunInstallers(concreteTypes).ConfigureAwait(false); var startableEndpoint = new StartableEndpoint(settings, builder, featureActivator, pipelineConfiguration, new EventAggregator(settings.Get<NotificationSubscriptions>()), transportInfrastructure, criticalError); return startableEndpoint; }
public async Task <IStartableEndpoint> Initialize() { RegisterCriticalErrorHandler(); var concreteTypes = settings.GetAvailableTypes() .Where(IsConcrete) .ToList(); WireUpConfigSectionOverrides(concreteTypes); var featureActivator = BuildFeatureActivator(concreteTypes); ConfigRunBeforeIsFinalized(concreteTypes); var transportDefinition = settings.Get <TransportDefinition>(); var connectionString = settings.Get <TransportConnectionString>().GetConnectionStringOrRaiseError(transportDefinition); var transportInfrastructure = transportDefinition.Initialize(settings, connectionString); settings.Set <TransportInfrastructure>(transportInfrastructure); var featureStats = featureActivator.SetupFeatures(container, pipelineSettings); pipelineConfiguration.RegisterBehaviorsInContainer(settings, container); DisplayDiagnosticsForFeatures.Run(featureStats); container.ConfigureComponent(b => settings.Get <Notifications>(), DependencyLifecycle.SingleInstance); await RunInstallers(concreteTypes).ConfigureAwait(false); var startableEndpoint = new StartableEndpoint(settings, builder, featureActivator, pipelineConfiguration, new EventAggregator(settings.Get <NotificationSubscriptions>()), transportInfrastructure, criticalError); return(startableEndpoint); }
public Task <IStartableEndpoint> Initialize() { RegisterCriticalErrorHandler(); var concreteTypes = settings.GetAvailableTypes() .Where(IsConcrete) .ToList(); WireUpConfigSectionOverrides(concreteTypes); var featureActivator = BuildFeatureActivator(concreteTypes); ConfigureStartsAndStops(concreteTypes); ConfigRunBeforeIsFinalized(concreteTypes); var featureStats = featureActivator.SetupFeatures(container, pipelineSettings); pipelineConfiguration.RegisterBehaviorsInContainer(settings, container); container.RegisterSingleton(featureStats); DisplayDiagnosticsForFeatures.Run(featureStats); WireUpInstallers(concreteTypes); var startableEndpoint = new StartableEndpoint(settings, builder, featureActivator, pipelineConfiguration, startables); return(Task.FromResult <IStartableEndpoint>(startableEndpoint)); }