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

            if (settings.Port != null)
            {
                return(new WebProxy(settings.Host, settings.Port.Value));
            }

            return(new WebProxy(settings.Host));
        }
        /// <summary>
        /// Creates a new <see cref="IWebProxy"/> object from the specified protocol settings.
        /// </summary>
        /// <param name="settings">The reference to the particular protocol proxy settings
        /// to create proxy object from.</param>
        /// <returns>A new <see cref="IWebProxy"/> object based on the specified settings.</returns>
        private static IWebProxy _Create(ProxyProtocolSettings settings)
        {
            Debug.Assert(settings != null);

            if (settings.Port != null)
            {
                return new WebProxy(settings.Host, settings.Port.Value);
            }

            return new WebProxy(settings.Host);
        }