private void ParseInput(object sender, EventArgs args) { proxylistAll.AddRange(ProxyParser.ParseString(textInput.Buffer.Text)); Application.Invoke(delegate { labelTotal.Text = proxylistAll.Count.ToString(); }); }
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); }