开发者

PostSharp access to original attribute markup string parameter

I have a POstSHarp attribute implementing OnMethodBoundaryAspect. The mark up is as follows:

[ExceptionLogging("RepositoryLayer")]

What I want to do within the imp开发者_开发技巧lementation of the aspect is access the string that was passed with the attribute markup above. The idea is that based on this value I can see (in a very rudimnentary manner) where the aspect is being called in the architecture, in this case in the Repository Layer.

How do I get access to this value with the aspect implementation? I cannot find it anywhere in the EVentArgs or anywhere else.

Many thanks

Brian


The constructor should store the string in an instance field of the aspect class; then you can access the instance field from the OnException method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜