Exemple #1
0
 public YamsDiModule(YamsConfig config, IDeploymentRepository deploymentRepository,
                     IDeploymentStatusWriter deploymentStatusWriter,
                     IUpdateSessionManager updateSessionManager)
 {
     _container = RegisterTypes(config, deploymentRepository, deploymentStatusWriter,
                                updateSessionManager).Build();
 }
 public ApplicationUpdateManager(
     string clusterId,
     string instanceId,
     IApplicationDeploymentDirectory applicationDeploymentDirectory,
     IApplicationPool applicationPool,
     IApplicationDownloader applicationDownloader,
     IApplicationInstaller applicationInstaller,
     IDeploymentStatusWriter deploymentStatusWriter)
 {
     _clusterId       = clusterId;
     this._instanceId = instanceId;
     _applicationDeploymentDirectory = applicationDeploymentDirectory;
     _applicationPool        = applicationPool;
     _applicationDownloader  = applicationDownloader;
     _applicationInstaller   = applicationInstaller;
     _deploymentStatusWriter = deploymentStatusWriter;
 }
Exemple #3
0
        public static ContainerBuilder RegisterTypes(YamsConfig config,
                                                     IDeploymentRepository deploymentRepository, IDeploymentStatusWriter deploymentStatusWriter,
                                                     IUpdateSessionManager updateSessionManager)
        {
            var builder = new ContainerBuilder();

            RegisterConfig(builder, config);

            RegisterProcessFactory(builder);

            RegisterProcessStopper(builder);

            RegisterApplicationConfigSymbolResolver(builder);

            RegisterApplicationConfigParser(builder);

            RegisterConfigurableApplicationFactory(builder);

            RegisterApplicationDeploymentDirectory(builder);

            RegisterApplicationPool(builder);

            RegisterApplicationInstaller(builder);

            RegisterApplicationDownloader(builder);

            RegisterApplicationUpdateManager(builder);

            RegisterDeploymentWatcher(builder);

            builder.RegisterInstance(updateSessionManager);

            builder.RegisterInstance(deploymentRepository);
            builder.RegisterInstance(deploymentStatusWriter);

            builder.RegisterType <YamsService>().As <IYamsService>().SingleInstance();

            RegisterAppDeploymentMatcher(builder);

            builder.RegisterType <DiagnosticsTraceWriter>().As <ITraceWriter>().SingleInstance();
            builder.RegisterType <JsonSerializer>().As <IJsonSerializer>().SingleInstance();

            builder.RegisterType <Os.System>().As <ISystem>().SingleInstance();

            return(builder);
        }