From 9736b8c8ede6a0d121dea8381f0abb561fad5631 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 19 Feb 2019 01:50:58 +0200 Subject: Implemented auto generated web clients for PPC and machine studio. Improved interactions with web clients across solutions. --- .../Web/MachineStudioWebClientBase.cs | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs new file mode 100644 index 000000000..dc5a14856 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs @@ -0,0 +1,79 @@ + +using System.Threading.Tasks; +using Tango.Web; +using Tango.Web.Authentication; + +namespace Tango.MachineStudio.Common.Web +{ + /// + /// Represents a machine service MachineStudio web client. + /// + /// + public abstract class MachineStudioWebClientBase : TangoWebClient + { + /// + /// Initializes a new instance of the class. + /// + /// The environment. + /// Existing token. + public MachineStudioWebClientBase(DeploymentSlot environment, WebToken token) : base(environment, "MachineStudio", token) + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The environment. + public MachineStudioWebClientBase(DeploymentSlot environment) : this(environment, null) + { + + } + + /// + /// Executes the CheckForUpdates action and returns Tango.MachineStudio.Common.Web.CheckForUpdatesResponse. + /// + /// + public Task CheckForUpdates(Tango.MachineStudio.Common.Web.CheckForUpdatesRequest request) + { + return Post("CheckForUpdates", request); + } + + /// + /// Executes the DownloadLatestVersion action and returns Tango.MachineStudio.Common.Web.DownloadLatestVersionResponse. + /// + /// + public Task DownloadLatestVersion(Tango.MachineStudio.Common.Web.DownloadLatestVersionRequest request) + { + return Post("DownloadLatestVersion", request); + } + + /// + /// Executes the UploadVersion action and returns Tango.MachineStudio.Common.Web.UploadVersionResponse. + /// + /// + public Task UploadVersion(Tango.MachineStudio.Common.Web.UploadVersionRequest request) + { + return Post("UploadVersion", request); + } + + /// + /// Executes the NotifyUploadCompleted action and returns Tango.MachineStudio.Common.Web.UploadCompletedResponse. + /// + /// + public Task NotifyUploadCompleted(Tango.MachineStudio.Common.Web.UploadCompletedRequest request) + { + return Post("NotifyUploadCompleted", request); + } + + /// + /// Executes the GetLatestVersion action and returns Tango.MachineStudio.Common.Web.LatestVersionResponse. + /// + /// + public Task GetLatestVersion(Tango.MachineStudio.Common.Web.LatestVersionRequest request) + { + return Post("GetLatestVersion", request); + } + + } +} -- cgit v1.3.1