System.Net.ProxyRegBlob.ParseProxyUri C# (CSharp) Method

ParseProxyUri() private static method

private static ParseProxyUri ( string proxyString, bool validate ) : Uri
proxyString string
validate bool
return System.Uri
        private static Uri ParseProxyUri(string proxyString, bool validate) {
            if (validate) {
                if (proxyString.Length == 0) {
                    return null;
                }
                if (proxyString.IndexOf('=') != -1) {
                    return null;
                }
            }
            if (proxyString.IndexOf("://") == -1) {
                proxyString = "http://" + proxyString;
            }
            return new Uri(proxyString);
        }