aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-18 13:21:20 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-18 13:21:20 +0200
commitccc6add5ea66565453283d7df0f6fbf2324b9264 (patch)
tree99d7693a0022043775644ebd0d03436bec9eb34a /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs
parent8c203b26d50818a1b16b2a7ec48eca7b082653f4 (diff)
downloadTango-ccc6add5ea66565453283d7df0f6fbf2324b9264.tar.gz
Tango-ccc6add5ea66565453283d7df0f6fbf2324b9264.zip
Refactored machine studio service.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs54
1 files changed, 0 insertions, 54 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs
deleted file mode 100644
index 8fdd18abe..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Settings;
-using Tango.Transport.Web;
-using Tango.Web;
-
-namespace Tango.MachineStudio.Common.Update
-{
- public class MachineStudioUpdateService : IMachineStudioUpdateService
- {
- private WebTransportClient _client;
-
- public DeploymentSlot Environment { get; set; }
-
- public MachineStudioUpdateService()
- {
- Environment = SettingsManager.Default.GetOrCreate<MachineStudioSettings>().DeploymentSlot;
- _client = new WebTransportClient();
- }
-
- public Task<CheckForUpdatesResponse> CheckForUpdates(CheckForUpdatesRequest request)
- {
- return _client.PostJson<CheckForUpdatesRequest, CheckForUpdatesResponse>(GetAddress() + "CheckForUpdates", request);
- }
-
- public Task<UploadVersionResponse> UploadVersion(UploadVersionRequest request)
- {
- return _client.PostJson<UploadVersionRequest, UploadVersionResponse>(GetAddress() + "UploadVersion", request);
- }
-
- public Task<UploadCompletedResponse> NotifyUploadCompleted(UploadCompletedRequest request)
- {
- return _client.PostJson<UploadCompletedRequest, UploadCompletedResponse>(GetAddress() + "NotifyUploadCompleted", request);
- }
-
- public Task<LatestVersionResponse> GetLatestVersion(LatestVersionRequest request)
- {
- return _client.PostJson<LatestVersionRequest, LatestVersionResponse>(GetAddress() + "GetLatestVersion", request);
- }
-
- public Task<DownloadLatestVersionResponse> DownloadLatestVersion(DownloadLatestVersionRequest request)
- {
- return _client.PostJson<DownloadLatestVersionRequest, DownloadLatestVersionResponse>(GetAddress() + "DownloadLatestVersion", request);
- }
-
- private String GetAddress()
- {
- return Environment.ToAddress() + "/api/MachineStudio/";
- }
- }
-}