Example #1
0
        private ContainerBuilder InitializeContainerBuilder(YamsConfig yamsConfig)
        {
            IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager()
                                                         .TryStartUpdateSession(applicationId => Task.FromResult(true))
                                                         .EndUpdateSession(applicationId => Task.FromResult(true));

            IDeploymentRepository deploymentRepository = new LocalDeploymentRepository(_deploymentDirPath,
                                                                                       new JsonDeploymentConfigSerializer(new JsonSerializer(new DiagnosticsTraceWriter())));

            return(YamsDiModule.RegisterTypes(yamsConfig, deploymentRepository, updateSessionManager));
        }
Example #2
0
        private void InitializeYamsService(YamsConfig yamsConfig)
        {
            IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager()
                                                         .TryStartUpdateSession(applicationId => Task.FromResult(true))
                                                         .EndUpdateSession(applicationId => Task.FromResult(true));

            _yamsDiModule = new YamsDiModule(yamsConfig, new LocalDeploymentRepository(
                                                 _deploymentDirPath, new JsonDeploymentConfigSerializer(
                                                     new JsonSerializer(new DiagnosticsTraceWriter()))), updateSessionManager);
            _yamsService = _yamsDiModule.YamsService;
        }
Example #3
0
        private void InitializeYamsService(YamsConfig yamsConfig)
        {
            IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager()
                .TryStartUpdateSession(applicationId => Task.FromResult(true))
                .EndUpdateSession(applicationId => Task.FromResult(true));

            _yamsDiModule = new YamsDiModule(yamsConfig, new LocalDeploymentRepository(
                _deploymentDirPath, new JsonDeploymentConfigSerializer(
                    new JsonSerializer(new DiagnosticsTraceWriter()))), updateSessionManager);
            _yamsService = _yamsDiModule.YamsService;
        }
        /// <summary>
        /// Create new YAMS service for local development
        /// </summary>
        public static IYamsService Create(YamsConfig config, string activeDirectory = null)
        {
            if (activeDirectory == null)
            {
                activeDirectory = Environment.CurrentDirectory;
            }

            var updateSessionManager = new LocalUpdateSessionManager();
            var serializer           = new JsonSerializer(new DiagnosticsTraceWriter());
            var configSerializer     = new JsonDeploymentConfigSerializer(serializer);
            var deploymentWriter     = new LocalDeploymentStatusWriter();
            var deploymentRepository = new LocalDevelopmentRepository(activeDirectory, configSerializer);

            return(new YamsDiModule(config, deploymentRepository, deploymentWriter, updateSessionManager).YamsService);
        }
Example #5
0
 public ProcessFactory(YamsConfig config, ISystem system)
 {
     _config     = config;
     this.system = system;
 }
Example #6
0
        private void InitializeYamsService(YamsConfig yamsConfig)
        {
            ContainerBuilder builder = InitializeContainerBuilder(yamsConfig);

            InitializeYamsService(builder.Build());
        }
Example #7
0
 public HealthProcessDecorator(YamsConfig config, IProcess process,
                               IIpcConnection ipcConnection) : base(process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }
Example #8
0
 public ProcessFactory(YamsConfig config)
 {
     _config = config;
 }
Example #9
0
 public HealthProcessDecorator(AppIdentity identity, YamsConfig config, IProcess process,
                               IIpcConnection ipcConnection) : base(identity, process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }
Example #10
0
 public GracefulShutdownProcessDecorator(YamsConfig config, IProcess process, IIpcConnection ipcConnection)
     : base(process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }
Example #11
0
 public GracefulShutdownProcessDecorator(AppIdentity identity, YamsConfig config, IProcess process, IIpcConnection ipcConnection)
     : base(identity, process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }