开发者

How do I create a pointcut to intercept all methods in a class with PostSharp?

开发者 https://www.devze.com 2022-12-08 18:08 出处:网络
I\'ve tried using AttributeTargetTypes, but i开发者_如何学Ct just won\'t work. What am I missing?The easiest way to apply an aspect to all methods of a class is to annotate this class with the aspect

I've tried using AttributeTargetTypes, but i开发者_如何学Ct just won't work. What am I missing?


The easiest way to apply an aspect to all methods of a class is to annotate this class with the aspect custom attribute. AttributeTargetTypes, when the custom attribute is applied on assembly-level, should work also, at least if the type is a part of the current assembly.

0

精彩评论

暂无评论...
验证码 换一张
取 消