C# AOP Method Interception on child method calls?
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?
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.
精彩评论