public object Clone() { LinkScraper clone = new LinkScraper(Url) { _analysisResult = _analysisResult .Select(li => li.Clone()) .OfType <LinkInfo>() .ToList() }; return(clone); }
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(); }
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(); }