Hello,
I have a project Company.Business that I'm trying to target with PostSharp to wrap my business layer. In the project Company.AOP, I have a method boundary aspect to use EL logging application block as such:
[Serializable]
public class MethodExcecutionAttribute : OnMethodBoundaryAspect
{
public override void OnEntry(MethodExecutionEventArgs eventArgs)
{
base.OnEntry(eventArgs);
//Log message
}
public override void OnException(MethodExecutionEventArgs eventArgs)
{
base.OnException(eventArgs);
//Log message
}
public override void OnExit(MethodExecutionEventArgs eventArgs)
{
base.OnExit(eventArgs);
//Log message
}
}
Simple enough; it simply logs the point in time. I try to target my entire business layer via:
[assembly: MethodExcecution(AttributeTargetTypes = "*",
AttributeTargetAssemblies = "Company.Business",
AttributeTargetTypeAttributes = MulticastAttributes.Public,
AttributeTargetMemberAttributes = MulticastAttributes.Public)]
But after compile, I inspect the DLL and it does not wrap the code as in the examples on the web site. What is wrong with this approach?
I do have it installed, and I verified it is running; it is generating output during compile time, with zero errors.
Thanks.