コード例 #1
0
        public static Uri DetermineEndpoint(IClientConfig config, IRequest request)
        {
            Uri endpoint = request.AlternateEndpoint != null
                ? new Uri(ClientConfig.GetUrl(request.AlternateEndpoint, config.RegionEndpointServiceName, config.UseHttp, config.UseDualstackEndpoint))
                : new Uri(config.DetermineServiceURL());

            return(InjectHostPrefix(config, request, endpoint));
        }
コード例 #2
0
        public static Uri DetermineEndpoint(IClientConfig config, IRequest request)
        {
            Uri endpoint = request.AlternateEndpoint != null
                ? new Uri(ClientConfig.GetUrl(config, request.AlternateEndpoint))
                : new Uri(config.DetermineServiceURL());

            return(InjectHostPrefix(config, request, endpoint));
        }
コード例 #3
0
 public static Uri DetermineEndpoint(IClientConfig config, IRequest request)
 {
     if (request.AlternateEndpoint == null)
     {
         return(new Uri(config.DetermineServiceURL()));
     }
     return(new Uri(ClientConfig.GetUrl(request.AlternateEndpoint, config.RegionEndpointServiceName, config.UseHttp, config.UseDualstackEndpoint)));
 }
コード例 #4
0
ファイル: AWS4Signer.cs プロジェクト: Bectinced-aeN/vrcsdk
 internal static string DetermineService(IClientConfig clientConfig)
 {
     if (string.IsNullOrEmpty(clientConfig.AuthenticationServiceName))
     {
         return(AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL()));
     }
     return(clientConfig.AuthenticationServiceName);
 }
コード例 #5
0
 private static string DetermineBucketRegionCode(IClientConfig config)
 {
     if (config.get_RegionEndpoint() != null && string.IsNullOrEmpty(config.get_ServiceURL()))
     {
         return(config.get_RegionEndpoint().get_SystemName());
     }
     return(AWSSDKUtils.DetermineRegion(config.DetermineServiceURL()));
 }
コード例 #6
0
 /// <summary>
 /// Constructor for DefaultRetryPolicy.
 /// </summary>
 /// <param name="config">The Client config object. This is used to
 /// retrieve the maximum number of retries  before throwing
 /// back a exception(This does not count the initial request) and
 /// the service URL for the request.</param>
 public DefaultRetryPolicy(IClientConfig config)
 {
     this.MaxRetries = config.MaxErrorRetry;
     if (config.ThrottleRetries)
     {
         string serviceURL = config.DetermineServiceURL();
         _retryCapacity = _capacityManagerInstance.GetRetryCapacity(serviceURL);
     }
 }
コード例 #7
0
        static string DetermineBucketRegionCode(IClientConfig config)
        {
            if (config.RegionEndpoint != null && string.IsNullOrEmpty(config.ServiceURL))
            {
                return(config.RegionEndpoint.SystemName);
            }

            return(AWSSDKUtils.DetermineRegion(config.DetermineServiceURL()));
        }
コード例 #8
0
        public static new AWS4SigningResult SignRequest(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, string awsAccessKeyId, string awsSecretAccessKey)
        {
            if (clientConfig is null)
            {
                throw new ArgumentNullException(nameof(clientConfig));
            }

            var service = !string.IsNullOrEmpty(clientConfig.AuthenticationServiceName)
                ? clientConfig.AuthenticationServiceName
                : AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL());

            return(SignRequest(request, clientConfig, metrics, awsAccessKeyId, awsSecretAccessKey, service, overrideSigningRegion: null));
        }
コード例 #9
0
ファイル: General.cs プロジェクト: eangelov/aws-sdk-net-1
        public static void SetClockSkewCorrection(IClientConfig config, TimeSpan value)
        {
            var func = typeof(CorrectClockSkew).GetTypeInfo().GetMethod("SetClockCorrectionForEndpoint", BindingFlags.Static | BindingFlags.NonPublic);

            func.Invoke(null, new object[] { config.DetermineServiceURL(), value });
        }
コード例 #10
0
ファイル: AWS4Signer.cs プロジェクト: aws/aws-sdk-net
 internal static string DetermineService(IClientConfig clientConfig)
 {
     return !string.IsNullOrEmpty(clientConfig.AuthenticationServiceName) 
         ? clientConfig.AuthenticationServiceName 
         : AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL());
 }
コード例 #11
0
 private static string DetermineService(IClientConfig clientConfig)
 {
     return((!string.IsNullOrEmpty(clientConfig.AuthenticationServiceName))
         ? clientConfig.AuthenticationServiceName
         : AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL()));
 }