private ProxyProvider GetProxy(ProxyConnectionSettings proxySettings) { if (proxySettings == null || !proxySettings.Enabled) { return(null); } var uri = new Uri(proxySettings.Uri); return(new ProxyProvider(uri, proxySettings.UserName, proxySettings.Password, proxySettings.Domain)); }
private static ProxyProvider GetProxy(ProxyConnectionSettings settings) { if (settings == null || !settings.UseProxy) { return(null); } var uri = new Uri(settings.Url); return(new ProxyProvider(uri, settings.Username, settings.Password, settings.Domain)); }
// TODO consider objects equal if UseProxy == false in both of them private bool Equals(ProxyConnectionSettings other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } return other.UseProxy.Equals(UseProxy) && Equals(other.Url, Url) && Equals(other.Domain, Domain) && Equals(other.Username, Username) && Equals(other.Password, Password); }
// TODO consider objects equal if UseProxy == false in both of them private bool Equals(ProxyConnectionSettings other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.UseProxy.Equals(UseProxy) && Equals(other.Url, Url) && Equals(other.Domain, Domain) && Equals(other.Username, Username) && Equals(other.Password, Password)); }
private bool IsProxyUriCorrect(ProxyConnectionSettings proxySettings) { if (proxySettings == null || !proxySettings.Enabled) { return(true); } var isProxyUrlSyntaxCorrect = true; try { var uri = new Uri(proxySettings.Uri); } catch (Exception) { isProxyUrlSyntaxCorrect = false; Facade.ResetConnection(); } View.SetProxyUrlValidationFault(isProxyUrlSyntaxCorrect); return(isProxyUrlSyntaxCorrect); }
public VersionOneSettings() { ProxySettings = new ProxyConnectionSettings(); }
public VersionOneSettings() { OAuth2 = true; ProxySettings = new ProxyConnectionSettings(); }