开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜