public void Setup(string local) { indexFile = new IndexFile(local); if (AsyncMode) { service = new ConcurrentQueueService(); consumer = Task.Factory.StartNew(service.Dequeue); } }
private void ProcessScript(string url, List <INode> nodes) { ConcurrentQueueService scriptService = new ConcurrentQueueService(); foreach (IElement script in nodes) { if (script.HasAttribute("src")) { var srcurl = script.GetAttribute("src"); var srcUrlNormalized = new Uri(new Uri(url), srcurl); } } }
public void Setup(string local) { indexFile = new IndexFile(local); downloadHtml = new DownloadFileQueue() { Extension = ".html" }; downloadHtml.Setup("WebPages"); downloadImges = new DownloadFileQueue() { Extension = ".jpg" }; downloadImges.Setup("images"); if (AsyncMode) { service = new ConcurrentQueueService(); consumer = Task.Factory.StartNew(service.Dequeue); } }