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)); }
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); }
public ProcessFactory(YamsConfig config, ISystem system) { _config = config; this.system = system; }
private void InitializeYamsService(YamsConfig yamsConfig) { ContainerBuilder builder = InitializeContainerBuilder(yamsConfig); InitializeYamsService(builder.Build()); }
public HealthProcessDecorator(YamsConfig config, IProcess process, IIpcConnection ipcConnection) : base(process) { _config = config; _ipcConnection = ipcConnection; }
public ProcessFactory(YamsConfig config) { _config = config; }
public HealthProcessDecorator(AppIdentity identity, YamsConfig config, IProcess process, IIpcConnection ipcConnection) : base(identity, process) { _config = config; _ipcConnection = ipcConnection; }
public GracefulShutdownProcessDecorator(YamsConfig config, IProcess process, IIpcConnection ipcConnection) : base(process) { _config = config; _ipcConnection = ipcConnection; }
public GracefulShutdownProcessDecorator(AppIdentity identity, YamsConfig config, IProcess process, IIpcConnection ipcConnection) : base(identity, process) { _config = config; _ipcConnection = ipcConnection; }