public HttpResponse DoAction <T>(AcsRequest <T> request, string regionId, Credential credential) where T : AcsResponse { var signer = Signer.GetSigner(new LegacyCredentials(credential)); FormatType?format = null; if (null == request.RegionId) { request.RegionId = regionId; } request.SetProductDomain(); List <Endpoint> endpoints = null; if (null != clientProfile) { format = clientProfile.GetFormat(); if (request.ProductDomain == null) { endpoints = clientProfile.GetEndpoints(request.Product, request.RegionId, request.LocationProduct, request.LocationEndpointType); } } return(DoAction(request, AutoRetry, MaxRetryNumber, request.RegionId, credential, signer, format, endpoints)); }
public HttpResponse DoAction <T>(AcsRequest <T> request, bool autoRetry, int maxRetryNumber, IClientProfile profile) where T : AcsResponse { if (null == profile) { throw new ClientException("SDK.InvalidProfile", "No active profile found."); } string regionId = profile.GetRegionId(); if (null != request.RegionId) { regionId = request.RegionId; } Credential credential = profile.GetCredential(); ISigner signer = profile.GetSigner(); FormatType? format = profile.GetFormat(); List <Endpoint> endpoints = null; if (request.ProductDomain == null) { endpoints = profile.GetEndpoints(regionId, request.Product, credential, request.LocationProduct, request.LocationEndpointType); } return(DoAction(request, autoRetry, maxRetryNumber, regionId, credential, signer, format, endpoints)); }
public Task <HttpResponse> DoActionAsync <T>(AcsRequest <T> request, string regionId, Credential credential, CancellationToken ct) where T : AcsResponse { Signer signer = Signer.GetSigner(new LegacyCredentials(credential)); FormatType?format = null; if (null == request.RegionId) { request.RegionId = regionId; } List <Endpoint> endpoints = null; if (null != clientProfile) { format = clientProfile.GetFormat(); endpoints = clientProfile.GetEndpoints(request.Product, request.RegionId, request.LocationProduct, request.LocationEndpointType); } return(DoActionAsync(request, autoRetry, maxRetryNumber, request.RegionId, credential, signer, format, endpoints, ct)); }
public HttpResponse DoAction <T>(AcsRequest <T> request, string regionId, Credential credential) where T : AcsResponse { ISigner signer = null; FormatType format = FormatType.JSON; List <Endpoint> endpoints = null; if (null != this.clientProfile) { signer = clientProfile.GetSigner(); format = clientProfile.GetFormat(); endpoints = clientProfile.GetEndpoints(regionId, request.Product, credential, request.LocationProduct, request.LocationEndpointType);; } return(DoAction(request, autoRetry, this.maxRetryNumber, regionId, credential, signer, format, endpoints)); }
public HttpResponse DoAction <T>(AcsRequest <T> request, string regionId, Credential credential) where T : AcsResponse { ISigner signer = null; //FormatType format = FormatType.JSON; List <Endpoint> endpoints = null; if (null != _clientProfile) { signer = _clientProfile.GetSigner(); //format = _clientProfile.GetFormat(); endpoints = _clientProfile.GetEndpoints(); } return(DoAction(request, AutoRetry, MaxRetryNumber, regionId, credential, signer, endpoints)); }
public HttpResponse DoAction <T>(AcsRequest <T> request, bool autoRetry, int maxRetryNumber, IClientProfile profile) where T : AcsResponse { if (null == profile) { throw new ClientException("SDK.InvalidProfile", "No active profile found."); } var regionId = profile.GetRegionId(); var credential = profile.GetCredential(); var signer = profile.GetSigner(); //FormatType format = profile.GetFormat(); var endpoints = profile.GetEndpoints(); return(DoAction(request, autoRetry, maxRetryNumber, regionId, credential, signer, endpoints)); }