public void AddUrlQueue(string strUrl) { CrawlerItem cI = new CrawlerItem(); cI.strUrl = strUrl; cI.strRefer = strUrl; m_Stack.Push(cI); }
public PageResult ProcessQueue(Encoding encoding) { PageResult pr = new PageResult(); if (m_Stack.Count == 0) { return(null); } else { CrawlerItem cI = m_Stack.Pop(); string strContent = GetPageByHttpWebRequest(cI.strUrl, encoding); pr.strPageContent = strContent; pr.strVisitUrl = cI.strUrl; return(pr); } }