Created
October 29, 2011 16:42
-
-
Save mattbrailsford/1324746 to your computer and use it in GitHub Desktop.
An example uGoLive check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Our.Umbraco.uGoLive.Checks | |
{ | |
[Check("8088E981-174C-4ABA-9867-AF219B4E0D9E", "Robots.txt", "Create a robots.txt file to block access to system folders", "SEO")] | |
public class RobotsTxtCheck : AbstractCheck | |
{ | |
public override bool CanRectify | |
{ | |
get { return false; } | |
} | |
public override CheckResult Check() | |
{ | |
if(!File.Exists(HttpContext.Current.Server.MapPath("~/robots.txt"))) | |
return new CheckResult { Status = CheckResultStatus.Failed, Message = "Robots.txt file not found." }; | |
return new CheckResult { Status = CheckResultStatus.Passed, Message = "Robots.txt file found." }; | |
} | |
public override RectifyResult Rectify() | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment