diff options
| author | Mirta <mirta@twine-s.com> | 2020-12-30 16:39:52 +0200 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2020-12-30 16:39:52 +0200 |
| commit | 00a491d93733d4625ad329b2ba8237f445364b3f (patch) | |
| tree | 4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/Tango.Web/TangoWebClient.cs | |
| parent | 124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff) | |
| download | Tango-00a491d9.tar.gz Tango-00a491d9.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/Tango.Web/TangoWebClient.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Web/TangoWebClient.cs | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/Software/Visual_Studio/Tango.Web/TangoWebClient.cs b/Software/Visual_Studio/Tango.Web/TangoWebClient.cs index 7c3c6ad2a..1d2f9fc8e 100644 --- a/Software/Visual_Studio/Tango.Web/TangoWebClient.cs +++ b/Software/Visual_Studio/Tango.Web/TangoWebClient.cs @@ -37,12 +37,6 @@ namespace Tango.Web public WebToken WebToken { get; private set; } public bool IsAuthenticated { get; private set; } - public TimeSpan RequestTimeout - { - get { return _client.RequestTimeout; } - set { _client.RequestTimeout = value; } - } - public TangoWebClient(DeploymentSlot environment, String controller) { _client = new WebTransportClient(); @@ -63,24 +57,6 @@ namespace Tango.Web Token = token; } - public TangoWebClient(TangoWebClient<TLoginRequest, TLoginResponse> cloned) - { - _client = new WebTransportClient(); - Environment = cloned.Environment; - Address = cloned.Address; - Controller = cloned.Controller; - IsAuthenticated = cloned.IsAuthenticated; - RequestTimeout = cloned.RequestTimeout; - WebToken = cloned.WebToken; - _lastLoginRequest = cloned._lastLoginRequest; - Token = cloned.Token; - } - - public T Clone<T>() where T : TangoWebClient<TLoginRequest, TLoginResponse> - { - return Activator.CreateInstance(typeof(T), new object[] { this }) as T; - } - public async Task<TLoginResponse> Login(TLoginRequest request) { var response = await _client.PostJson<TLoginRequest, TLoginResponse>(GetActionAddress("Login"), request); @@ -109,7 +85,7 @@ namespace Tango.Web var response = await _client.PostJson<TRequest, TResponse>(GetActionAddress(action), request); return response; } - catch (TokenExpiredException ex) + catch (TokenExpiredException) { try { @@ -122,7 +98,7 @@ namespace Tango.Web throw; } } - catch (Exception ex) + catch { throw; } |
