Пример #1
0
 public override void ExecuteDeploymentActions(string user)
 {
     foreach (IDeploymentAction action in applicationContext.GetAll <IDeploymentAction>())
     {
         action.Execute(user);
     }
 }
Пример #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());
        }
Пример #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());
        }
Пример #4
0
 public IEnumerable <T> ResolveAll <T>()
 {
     return(applicationContext.GetAll <T>());
 }