diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-19 14:52:54 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-19 14:52:54 +0200 |
| commit | c3ed01b6c75c44cfeca650b43deb058b1551a9bb (patch) | |
| tree | 87f8c8391373c3fa50eb7248798ce8fd99fde8c6 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs | |
| parent | de762e7e5b346af5a12eff04cbaa0696eec15b8c (diff) | |
| download | Tango-c3ed01b6c75c44cfeca650b43deb058b1551a9bb.tar.gz Tango-c3ed01b6c75c44cfeca650b43deb058b1551a9bb.zip | |
Moved machine studio update azure !!!
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.cs | 42 |
1 files changed, 42 insertions, 0 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 new file mode 100644 index 000000000..aae1fe70d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; +using Tango.Transport.Web; + +namespace Tango.MachineStudio.Common.Update +{ + public class MachineStudioUpdateService : IMachineStudioUpdateService + { + private string address; + private WebTransportClient _client; + + public MachineStudioUpdateService() + { + address = SettingsManager.Default.GetOrCreate<MachineStudioSettings>().MachineServiceAddress + "/api/MachineStudio/"; + _client = new WebTransportClient(); + } + + public Task<CheckForUpdatesResponse> CheckForUpdates(CheckForUpdatesRequest request) + { + return _client.PostJson<CheckForUpdatesRequest, CheckForUpdatesResponse>(address + "CheckForUpdates", request); + } + + public Task<UploadVersionResponse> UploadVersion(UploadVersionRequest request) + { + return _client.PostJson<UploadVersionRequest, UploadVersionResponse>(address + "UploadVersion", request); + } + + public Task<UploadCompletedResponse> NotifyUploadCompleted(UploadCompletedRequest request) + { + return _client.PostJson<UploadCompletedRequest, UploadCompletedResponse>(address + "NotifyUploadCompleted", request); + } + + public Task<LatestVersionResponse> GetLatestVersion(LatestVersionRequest request) + { + return _client.PostJson<LatestVersionRequest, LatestVersionResponse>(address + "GetLatestVersion", request); + } + } +} |
