Skip to content

Instantly share code, notes, and snippets.

@vmandic
Created October 19, 2018 19:41
Show Gist options
  • Select an option

  • Save vmandic/d6e4ceece794e621cef96ca3cf782e0d to your computer and use it in GitHub Desktop.

Select an option

Save vmandic/d6e4ceece794e621cef96ca3cf782e0d to your computer and use it in GitHub Desktop.
meds-processor, p2, s10
public async Task<ActionResult> Index(
[FromServices] HzzoHtmlScraper scraper,
[FromServices] HzzoExcelDownloader downloader)
{
var startTime = DateTime.Now;
var meds = await downloader.Run(await scraper.Run());
var totalTime = startTime - DateTime.Now;
return Ok(
$"Done! Handler duration: {totalTime.Duration()}" +
Environment.NewLine +
Environment.NewLine +
string.Join(Environment.NewLine, meds.Select(x => x.FileName))
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment