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;
}