public DenServicesController(string path, DenConfigController denConfigController = null) : this(denConfigController) { this.Path = Environment.GetEnvironmentVariable(WAYK_DEN_HOME); if (string.IsNullOrEmpty(this.Path)) { this.Path = path; } this.Path = this.Path.EndsWith($"{System.IO.Path.DirectorySeparatorChar}") ? this.Path : $"{this.Path}{System.IO.Path.DirectorySeparatorChar}"; this.DenConfig = this.denConfigController.GetConfig(); this.DenNetwork = new DenNetwork(this); if (this.DenConfig == null) { throw new Exception("Could not find WaykDen configuration in given path. Make sure WaykDen configuration is in current folder or set WAYK_DEN_HOME to the path of WaykDen configuration"); } Platforms p = string.Equals(this.DenConfig.DenDockerConfigObject.Platform, "Linux") ? Platforms.Linux : Platforms.Windows; this.DenConfig.DenImageConfigObject = new DenImageConfigObject(p); this.DockerClient = new DockerClientConfiguration(new Uri(this.DenConfig.DenDockerConfigObject.DockerClientUri)).CreateClient(); }
public DenServicesController(DenConfigController denConfigController) { this.denConfigController = denConfigController; }