View Full Version : How can I get access to the members of the advised object from the advisor?
Someone
03-31-2007, 02:59 PM
Hi!
I'm new in Spring.net framework.
Could someone give me an short example of how can I access the advised object members( methods, fields, controls..) from the advisor? ( if it is posible)
Thx!
Mark Pollack
04-01-2007, 02:44 PM
Hi,
You can get a hold of the advised (target) object via properties on the IMethodInvocation interface (i.e. Target) for interception around advice or as method arguments for other interception advice types. The docs (atm 12.3.2.5) show how to do this for introduction advice. Take a look at ConsoleLoggingBeforeAdvice and ModificationAdvice in the AOP quickstart for some example usage.
Cheers,
Mark
Someone
04-01-2007, 10:52 PM
That "target" argument was quite suggestive...:)
Thanks!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.