Exemplo n.º 1
0
        public ProxyConfiguration Build()
        {
            Validate();
            ProxyConfiguration result = new ProxyConfiguration();

            if (IsHttpProxy())
            {
                result.SetHttpHost(httpHost);
                result.SetHttpPort(httpPort);
                result.SetHttpScheme();
            }
            if (IsCredentialsNotNull())
            {
                result.SetUserName(userName);
                result.SetPassword(password);
                result.SetCredentials(true);
            }
            return(result);
        }