示例#1
0
        private void ParseInput(object sender, EventArgs args)
        {
            proxylistAll.AddRange(ProxyParser.ParseString(textInput.Buffer.Text));

            Application.Invoke(delegate {
                labelTotal.Text = proxylistAll.Count.ToString();
            });
        }
示例#2
0
        public static async Task <ProxyList> ParseAllAsync()
        {
            var proxies = new ProxyList();

            var tasks = new List <Task <ProxyList> >();

            tasks.Add(ParseUsProxyAsync());
            tasks.Add(ParseFreeProxyListAsync());


            foreach (var task in tasks)
            {
                proxies.AddRange(await task);
            }

            return(proxies);
        }