コード例 #1
0
        public object Clone()
        {
            LinkScraper clone = new LinkScraper(Url)
            {
                _analysisResult = _analysisResult
                                  .Select(li => li.Clone())
                                  .OfType <LinkInfo>()
                                  .ToList()
            };

            return(clone);
        }
コード例 #2
0
        async static Task Main(string[] args)
        {
            LinkScraper original = new LinkScraper("http://www.jp.dk");
            await original.ScrapeAsync();

            foreach (LinkInfo info in original.AnalysisResult)
            {
                Console.WriteLine($"Reference to {info.Href} at index {info.Index}");
            }

            Console.ReadLine();
        }
コード例 #3
0
        async static Task Main(string[] args)
        {
            LinkScraper ls = new LinkScraper("http://www.jp.dk");
            await ls.ScrapeAsync();

            IEnumerable <LinkInfo> result = ls.AnalysisResult;

            foreach (LinkInfo info in result)
            {
                Console.WriteLine($"Reference to {info.Href} at index {info.Index}");
            }

            Console.ReadLine();
        }