diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-02-19 01:50:58 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-02-19 01:50:58 +0200 |
| commit | 9736b8c8ede6a0d121dea8381f0abb561fad5631 (patch) | |
| tree | 1c38f3f5be82b923ffae40fae00a25487179ab54 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebService.cs | |
| parent | be3343cc0268179c7a6f628fa5e68f323a3335e5 (diff) | |
| download | Tango-9736b8c8ede6a0d121dea8381f0abb561fad5631.tar.gz Tango-9736b8c8ede6a0d121dea8381f0abb561fad5631.zip | |
Implemented auto generated web clients for PPC and machine studio.
Improved interactions with web clients across solutions.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebService.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebService.cs | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebService.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebService.cs deleted file mode 100644 index d0aa8a5bf..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebService.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.MachineStudio.Common.Authentication; -using Tango.Settings; -using Tango.Transport.Web; -using Tango.Web; - -namespace Tango.MachineStudio.Common.Web -{ - public class MachineStudioWebService : IMachineStudioWebService - { - private WebTransportClient _client; - - public DeploymentSlot Environment { get; set; } - - public MachineStudioWebService() - { - 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); - } - - public Task<LoginResponse> Login(LoginRequest request) - { - return _client.PostJson<LoginRequest, LoginResponse>(GetAddress() + "Login", request); - } - - private String GetAddress() - { - return Environment.ToAddress() + "/api/MachineStudio/"; - } - } -} |
