Calling a method in an interceptable object from itself

Topics: Policy Injection Application Block
Dec 4, 2007 at 4:21 PM
I´m calling from a client object a public method A of an interceptable object. This method A, sometimes calls another public method B of itself (in the way Me.B()) but only under certain circumstances. By intercepting the method calls of the interceptable object, I want to measure the elapsed time of each call, to method A or method B even when method B is called from method A.
The problem is that, it doesn´t matter if the method A finally calls method B or not. I can only measure the elapsed time of method A, but not of method B.
Can anyone give me a hand ?
Thanks in advance.
Dec 10, 2007 at 10:06 PM

You will have to invoke the method on this through a wrapped reference. Here's a related thread where a similar situation is described:

Hope this helps,