public static void DownLoadHtml(IEnumerable <string> domains) { foreach (var domain in domains) { WorkerDownloadHtml workerDownloadHtml = new WorkerDownloadHtml(domain); workerDownloadHtml.StartConsume(); } }
public static void RunDownloadHtml(IEnumerable <string> domains) { foreach (var domain in domains) { Task.Factory.StartNew(() => { WorkerDownloadHtml w = new WorkerDownloadHtml(domain); w.StartConsume(); }); } }