I'm trying to write a CompileTimeValidate(MethodBase method)
for postsharp. the problem is when a violation occurs it only shows Description in the Error List. The 'File' and 'Line' columns are empty.
The only info that I get to work with is a MethodBase
instance of the method that the attribute was applied to.
is there a way to get the source file and line number detail out of a MethodBase
object?
public override bool CompileTimeValidate(MethodBase method)
{
MessageSource.MessageSink.Write(new Message(SeverityType.Error, "CU0001",
"MyError", "MyAspectLibrary"));
return false;
}