public void Reset() { this.winHttpFinder.Reset(); if (this.netFinder != null) { this.netFinder.Reset(); } this.currentFinder = this.winHttpFinder; }
public void Reset() { winHttpFinder.Reset(); if (netFinder != null) { netFinder.Reset(); } // Some settings changed, so let's reset the current finder to WinHttpWebProxyFinder, since // now it may work (if it didn't already before). currentFinder = winHttpFinder; }
public bool GetProxies(Uri destination, out IList <string> proxyList) { if (this.currentFinder.GetProxies(destination, out proxyList)) { return(true); } if ((!allowFallback || !this.currentFinder.IsUnrecognizedScheme) || (this.currentFinder != this.winHttpFinder)) { return(false); } if (this.netFinder == null) { this.netFinder = new NetWebProxyFinder(this.engine); } this.currentFinder = this.netFinder; return(this.currentFinder.GetProxies(destination, out proxyList)); }
public bool GetProxies(Uri destination, out IList<string> proxyList) { if (this.currentFinder.GetProxies(destination, out proxyList)) { return true; } if ((!allowFallback || !this.currentFinder.IsUnrecognizedScheme) || (this.currentFinder != this.winHttpFinder)) { return false; } if (this.netFinder == null) { this.netFinder = new NetWebProxyFinder(this.engine); } this.currentFinder = this.netFinder; return this.currentFinder.GetProxies(destination, out proxyList); }
public bool GetProxies(Uri destination, out IList <string> proxyList) { if (currentFinder.GetProxies(destination, out proxyList)) { return(true); } if (allowFallback && currentFinder.IsUnrecognizedScheme && (currentFinder == winHttpFinder)) { // If WinHttpWebProxyFinder failed because the script location has a != HTTP scheme, // fall back to NetWebProxyFinder which supports also other schemes. if (netFinder == null) { netFinder = new NetWebProxyFinder(engine); } currentFinder = netFinder; return(currentFinder.GetProxies(destination, out proxyList)); } return(false); }
public bool GetProxies(Uri destination, out IList<string> proxyList) { if (currentFinder.GetProxies(destination, out proxyList)) { return true; } if (allowFallback && currentFinder.IsUnrecognizedScheme && (currentFinder == winHttpFinder)) { // If WinHttpWebProxyFinder failed because the script location has a != HTTP scheme, // fall back to NetWebProxyFinder which supports also other schemes. if (netFinder == null) { netFinder = new NetWebProxyFinder(engine); } currentFinder = netFinder; return currentFinder.GetProxies(destination, out proxyList); } return false; }
public HybridWebProxyFinder(AutoWebProxyScriptEngine engine) { this.engine = engine; this.winHttpFinder = new WinHttpWebProxyFinder(engine); this.currentFinder = winHttpFinder; }