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
}