/// <summary>
        /// Creates a new <see cref="IWebProxy"/> object from the specified settings without
        /// applying authentication credentials.
        /// </summary>
        /// <param name="settings">The reference to the proxy settings to create proxy object
        /// from.</param>
        /// <returns>A new <see cref="IWebProxy"/> object based on the specified settings.</returns>
        private IWebProxy _Create(ProxySettings settings)
        {
            Debug.Assert(settings != null);

            if (!_HasValidManualSettings(settings))
            {
                return(WebRequest.GetSystemWebProxy());
            }

            var httpProxy = _Create(settings.HttpSettings);

            if (settings.UseSameSettings)
            {
                return(httpProxy);
            }

            var httpsProxy = _Create(settings.HttpsSettings);
            var proxy      = new AggregateWebProxy();

            proxy.AddProxy("http", httpProxy);
            proxy.AddProxy("https", httpsProxy);

            return(proxy);
        }
        /// <summary>
        /// Creates a new <see cref="IWebProxy"/> object from the specified settings without
        /// applying authentication credentials.
        /// </summary>
        /// <param name="settings">The reference to the proxy settings to create proxy object
        /// from.</param>
        /// <returns>A new <see cref="IWebProxy"/> object based on the specified settings.</returns>
        private IWebProxy _Create(ProxySettings settings)
        {
            Debug.Assert(settings != null);

            if (!_HasValidManualSettings(settings))
            {
                return WebRequest.GetSystemWebProxy();
            }

            var httpProxy = _Create(settings.HttpSettings);
            if (settings.UseSameSettings)
            {
                return httpProxy;
            }

            var httpsProxy = _Create(settings.HttpsSettings);
            var proxy = new AggregateWebProxy();
            proxy.AddProxy("http", httpProxy);
            proxy.AddProxy("https", httpsProxy);

            return proxy;
        }