Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created March 25, 2014 15:15
Show Gist options
  • Select an option

  • Save mgroves/9763928 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/9763928 to your computer and use it in GitHub Desktop.
public override bool CompileTimeValidate(MethodBase method)
{
if (!typeof (ServiceBase).IsAssignableFrom(method.DeclaringType))
{
Message.Write(method, SeverityType.Error, "SEI01", "The target type (" + method.DeclaringType.FullName + ") does not implement ServiceBase.");
return false;
}
return base.CompileTimeValidate(method);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment