From 8c203b26d50818a1b16b2a7ec48eca7b082653f4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 18 Feb 2019 11:33:30 +0200 Subject: Implemented new Machine Studio Publish CLI and UI. --- .../Update/MachineStudioUpdateService.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs index 79dd2ec96..8fdd18abe 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.Settings; using Tango.Transport.Web; +using Tango.Web; namespace Tango.MachineStudio.Common.Update { @@ -12,9 +13,11 @@ namespace Tango.MachineStudio.Common.Update { private WebTransportClient _client; + public DeploymentSlot Environment { get; set; } + public MachineStudioUpdateService() { - + Environment = SettingsManager.Default.GetOrCreate().DeploymentSlot; _client = new WebTransportClient(); } @@ -38,14 +41,14 @@ namespace Tango.MachineStudio.Common.Update return _client.PostJson(GetAddress() + "GetLatestVersion", request); } - private String GetAddress() + public Task DownloadLatestVersion(DownloadLatestVersionRequest request) { - return SettingsManager.Default.GetOrCreate().GetMachineServiceAddress() + "/api/MachineStudio/"; + return _client.PostJson(GetAddress() + "DownloadLatestVersion", request); } - public Task DownloadLatestVersion(DownloadLatestVersionRequest request) + private String GetAddress() { - return _client.PostJson(GetAddress() + "DownloadLatestVersion", request); + return Environment.ToAddress() + "/api/MachineStudio/"; } } } -- cgit v1.3.1