From e852921ea5399f228c804e999847277005f76e62 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 14 Jan 2019 13:55:48 +0200 Subject: Machine Studio v4.0.1.0 --- .../Update/MachineStudioUpdateService.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update') 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 77828d490..5b90cb095 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs @@ -10,33 +10,37 @@ namespace Tango.MachineStudio.Common.Update { public class MachineStudioUpdateService : IMachineStudioUpdateService { - private string address; private WebTransportClient _client; public MachineStudioUpdateService() { - address = SettingsManager.Default.GetOrCreate().GetMachineServiceAddress() + "/api/MachineStudio/"; + _client = new WebTransportClient(); } public Task CheckForUpdates(CheckForUpdatesRequest request) { - return _client.PostJson(address + "CheckForUpdates", request); + return _client.PostJson(GetAddress() + "CheckForUpdates", request); } public Task UploadVersion(UploadVersionRequest request) { - return _client.PostJson(address + "UploadVersion", request); + return _client.PostJson(GetAddress() + "UploadVersion", request); } public Task NotifyUploadCompleted(UploadCompletedRequest request) { - return _client.PostJson(address + "NotifyUploadCompleted", request); + return _client.PostJson(GetAddress() + "NotifyUploadCompleted", request); } public Task GetLatestVersion(LatestVersionRequest request) { - return _client.PostJson(address + "GetLatestVersion", request); + return _client.PostJson(GetAddress() + "GetLatestVersion", request); + } + + private String GetAddress() + { + return SettingsManager.Default.GetOrCreate().GetMachineServiceAddress() + "/api/MachineStudio/"; } } } -- cgit v1.3.1