コード例 #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));
        }
コード例 #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;
        }
コード例 #3
0
ファイル: EndToEndTest.cs プロジェクト: Microsoft/Yams
        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;
        }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
ファイル: ProcessFactory.cs プロジェクト: zhonli/Yams
 public ProcessFactory(YamsConfig config, ISystem system)
 {
     _config     = config;
     this.system = system;
 }
コード例 #6
0
        private void InitializeYamsService(YamsConfig yamsConfig)
        {
            ContainerBuilder builder = InitializeContainerBuilder(yamsConfig);

            InitializeYamsService(builder.Build());
        }
コード例 #7
0
ファイル: HealthProcessDecorator.cs プロジェクト: cDoru/Yams
 public HealthProcessDecorator(YamsConfig config, IProcess process,
                               IIpcConnection ipcConnection) : base(process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }
コード例 #8
0
 public ProcessFactory(YamsConfig config)
 {
     _config = config;
 }
コード例 #9
0
ファイル: HealthProcessDecorator.cs プロジェクト: zhonli/Yams
 public HealthProcessDecorator(AppIdentity identity, YamsConfig config, IProcess process,
                               IIpcConnection ipcConnection) : base(identity, process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }
コード例 #10
0
 public GracefulShutdownProcessDecorator(YamsConfig config, IProcess process, IIpcConnection ipcConnection)
     : base(process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }
コード例 #11
0
 public GracefulShutdownProcessDecorator(AppIdentity identity, YamsConfig config, IProcess process, IIpcConnection ipcConnection)
     : base(identity, process)
 {
     _config        = config;
     _ipcConnection = ipcConnection;
 }