Exemplo n.º 1
0
        public async Task <string> GetWebsiteContent(Website website, Func <string, string> extractor)
        {
            if (website == null || extractor == null)
            {
                return(string.Empty);
            }

            string content = await httpClient.GetUrlContentAsync(website.Url);

            website.Processed = true;

            return(extractor.Invoke(content));
        }