protected virtual void ConfigureContainer() { foreach (var assembly in Assemblies) { applicationContext.RegisterSingletons <IDeploymentAction>(assembly); applicationContext.RegisterSingletons <IEnvironmentValidationAction>(assembly); RegisterConsumersFrom(assembly); } }
public void RegisterDefaultServices() { applicationContext.RegisterSingleton <IServiceLocator>(() => new SpringServiceLocator(applicationContext)); applicationContext.RegisterSingletons <IBusConfigurationAware>(typeof(IServiceBus).Assembly); foreach (var busConfigurationAware in applicationContext.GetAll <IBusConfigurationAware>()) { busConfigurationAware.Configure(config, this); } foreach (var module in config.MessageModules) { applicationContext.RegisterSingleton(module, module.FullName); } applicationContext.RegisterSingleton <IReflection>(() => new DefaultReflection()); applicationContext.RegisterSingleton(config.SerializerType); applicationContext.RegisterSingleton <IEndpointRouter>(() => new EndpointRouter()); }
public void RegisterDefaultServices(IEnumerable <Assembly> assemblies) { applicationContext.RegisterSingleton <IServiceLocator>(() => new SpringServiceLocator(applicationContext)); foreach (var assembly in assemblies) { applicationContext.RegisterSingletons <IBusConfigurationAware>(assembly); } var locator = applicationContext.Get <IServiceLocator>(); foreach (var busConfigurationAware in applicationContext.GetAll <IBusConfigurationAware>()) { busConfigurationAware.Configure(config, this, locator); } foreach (var module in config.MessageModules) { applicationContext.RegisterSingleton(module, module.FullName); } applicationContext.RegisterSingleton <IReflection>(() => new SpringReflection()); applicationContext.RegisterSingleton(config.SerializerType); applicationContext.RegisterSingleton <IEndpointRouter>(() => new EndpointRouter()); }
protected virtual void ConfigureContainer() { applicationContext.RegisterSingletons <IDeploymentAction>(Assembly); applicationContext.RegisterSingletons <IEnvironmentValidationAction>(Assembly); RegisterConsumers(); }