Skip to content

Instantly share code, notes, and snippets.

@ThomasArdal
Created June 3, 2013 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasArdal/5700667 to your computer and use it in GitHub Desktop.
Save ThomasArdal/5700667 to your computer and use it in GitHub Desktop.
var links =
LinkCheck
.On(x => x.Url(new Uri(context.Url)))
.AsBot(bot => bot.Google())
.Start();
.Where(x => (int) x.StatusCode >= 400)
.Select(x => new ValidationIssue
{
Severity = SeverityEnum.Error,
Title = "The following link returned status code " +
(int) x.StatusCode + ": " + x.Url.ToString() +
"."
})
.ToList()
.ForEach(x => validationResult.Issues.Add(x));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment