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

ParseProtocolProxies() private static method

private static ParseProtocolProxies ( string proxyListString ) : Hashtable
proxyListString string
return System.Collections.Hashtable
        private static Hashtable ParseProtocolProxies(string proxyListString) {
            if (proxyListString.Length == 0) {
                return null;
            }
            // parse something like "http=http://http-proxy;https=http://https-proxy;ftp=http://ftp-proxy"
            char[] splitChars = new char[] { ';', '=' };
            string[] proxyListStrings = proxyListString.Split(splitChars);
            bool protocolPass = true;
            string protocolString = null;
            Hashtable proxyListHashTable = new Hashtable(CaseInsensitiveAscii.StaticInstance);
            foreach (string elementString in proxyListStrings) {
                string elementString2 = elementString.Trim().ToLower(CultureInfo.InvariantCulture);
                if (protocolPass) {
                    protocolString = elementString2;
                }
                else {
                    proxyListHashTable[protocolString] = ParseProxyUri(elementString2, false);
                }
                protocolPass = !protocolPass;
            }
            if (proxyListHashTable.Count == 0) {
                return null;
            }
            return proxyListHashTable;
        }