コード例 #1
0
        private void ProcessPage(string page)
        {
            ParseHTML parse = new ParseHTML();

            parse.Source = page;

            if ((excludeindexes == true) && ((page.ToLower().Contains("to parent directory")) || (page.ToLower().Contains("index of")) || (page.ToLower().Contains("directory listing of"))))
            {
                // indexable items popped here...
            }
            else
            {
                while (!parse.Eof())
                {
                    char ch = parse.Parse();
                    if (ch == 0)
                    {
                        Attribute a = parse.GetTag()["HREF"];
                        if (a != null)
                        {
                            ProcessLink(a.Value);
                        }

                        a = parse.GetTag()["SRC"];
                        if (a != null)
                        {
                            ProcessLink(a.Value);
                        }
                        a = null;
                    }
                }
                parse = null;
                System.GC.Collect();
            }
        }
コード例 #2
0
ファイル: DocumentWorker.cs プロジェクト: liorvh/wikto
		private void ProcessPage(string page)
		{
			ParseHTML parse = new ParseHTML();
			parse.Source = page;

            if ((excludeindexes == true) && ((page.ToLower().Contains("to parent directory")) || (page.ToLower().Contains("index of")) || (page.ToLower().Contains("directory listing of"))))
            {
                // indexable items popped here...
            }
            else
            {
                while (!parse.Eof())
                {
                    char ch = parse.Parse();
                    if (ch == 0)
                    {
                        Attribute a = parse.GetTag()["HREF"];
                        if (a != null)
                            ProcessLink(a.Value);

                        a = parse.GetTag()["SRC"];
                        if (a != null)
                            ProcessLink(a.Value);
                        a = null;
                    }
                }
                parse = null;
                System.GC.Collect();
            }
		}