Example #1
0
 public static void Set(ProxyInformation proxyInformation)
 {
     DefaultProxy = proxyInformation;
     if (proxyInformation.UseProxy)
     {
         WebRequest.DefaultWebProxy = Helper.CreateProxy(proxyInformation);
     }
 }
Example #2
0
        public bool Equals(ProxyInformation other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Equals(other.useProxy, useProxy) &&
                   other.port == port &&
                   Equals(other.username, username) &&
                   Equals(other.password, password) &&
                   Equals(other.useDefaultCredentails, useDefaultCredentails) &&
                   Equals(other.url, url) &&
                   Equals(other.tfsProxyUrl, tfsProxyUrl));
        }