views:

46

answers:

1

My AOP (C#) implementation always intercepts the first (public) method call but not subsequent methods called within the first intercepted method, is this a limitation with ContextBoundObject AOP implementations or am I doing it wrong?

[InterceptMe]
public void MethodOne()
{
    MethodTwo();
}

[InterceptMe]
public void MethodTwo() 
{ 
   //not intecepted from MethodOne Call 
}

Any Ideas?

+1  A: 

AFAIK, context bound object interception only works for intercepting calls at a context boundary. Since methodtwo lies within the same context as methodone, it does not cross a boundary and will not be intercepted.

x0n
Makes sense I thought as much, thanks for clearing it up.
Jon