Beispiel #1
0
 void setProxy(String hosts, IProxy proxy)
 {
     String[] patterns = StringAux.split(hosts, ",");
     if (proxies == null)
     {
         proxies = new System.Collections.ArrayList();
     }
     lock (proxies) {
         for (int i = 0; i < patterns.Length; i++)
         {
             if (proxy == null)
             {
                 proxies[0] = null;
                 proxies[0] = System.Text.Encoding.Default.GetBytes(patterns[i]);
             }
             else
             {
                 proxies.Add(System.Text.Encoding.Default.GetBytes(patterns[i]));
                 proxies.Add(proxy);
             }
         }
     }
 }