Amazon.S3.AmazonS3Client.ConfigureProxy C# (CSharp) Method

ConfigureProxy() private method

private ConfigureProxy ( HttpWebRequest httpRequest ) : void
httpRequest HttpWebRequest
return void
        internal void ConfigureProxy(HttpWebRequest httpRequest)
        {
#if BCL||CORECLR
#if BCL
            if (!string.IsNullOrEmpty(Config.ProxyHost) && Config.ProxyPort != -1)
            {
                WebProxy proxy = new WebProxy(Config.ProxyHost, Config.ProxyPort);
                httpRequest.Proxy = proxy;
            }
#elif CORECLR
            httpRequest.Proxy = Config.GetWebProxy();
#endif
            if (httpRequest.Proxy != null && Config.ProxyCredentials != null)
            {
                httpRequest.Proxy.Credentials = Config.ProxyCredentials;
            }
#endif
        }
AmazonS3Client