Ejemplo n.º 1
0
 protected virtual void ConfigureContainer()
 {
     foreach (var assembly in Assemblies)
     {
         applicationContext.RegisterSingletons <IDeploymentAction>(assembly);
         applicationContext.RegisterSingletons <IEnvironmentValidationAction>(assembly);
         RegisterConsumersFrom(assembly);
     }
 }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
 protected virtual void ConfigureContainer()
 {
     applicationContext.RegisterSingletons <IDeploymentAction>(Assembly);
     applicationContext.RegisterSingletons <IEnvironmentValidationAction>(Assembly);
     RegisterConsumers();
 }