Reputation: 61380
I've created a type-level aspect in PostSharp, it adds some method preprocessing. I've applied it to the class, it works as advertised. However, in the classes derived from that one, it does not - method entry code is not hit.
How do I make my aspect inheritable, please?
I've tried adding [AttributeUsage(AttributeTargets.Class, Inherited=true)]
to the aspect class - no effect.
Upvotes: 1
Views: 604
Reputation: 692
You need to set AttributeInheritance = MulticastInheritance.Multicast
Read more about it in the documentation
Mulicast Attribute (Aspect) inheritance
Upvotes: 1