tags:

views:

17

answers:

1

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

[ExceptionLogging("RepositoryLayer")]

What I want to do within the implementation 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

+1  A: 

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.

Gael Fraiteur
...blush! Yes that makes sense. I should try to remember: "Look for the simple, obvious solution first"
Redeemed1