Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        // 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));
        }
Пример #5
0
        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);
        }
Пример #6
0
 public VersionOneSettings()
 {
     ProxySettings = new ProxyConnectionSettings();
 }
 public VersionOneSettings()
 {
     OAuth2        = true;
     ProxySettings = new ProxyConnectionSettings();
 }
Пример #8
0
 public VersionOneSettings()
 {
     ProxySettings = new ProxyConnectionSettings();
 }
        public VersionOneSettings()
        {
	        OAuth2 = true;
            ProxySettings = new ProxyConnectionSettings();
        }