向 Spring.Net 中的递归方法注入建议? [英] Injecting advice to a recursive method in Spring.Net?

查看:25
本文介绍了向 Spring.Net 中的递归方法注入建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Spring.NET 对 AOP 的支持来进行依赖注入/控制反转/面向方面的编程(对不起,大量流行语 - 也许我会发布一个单独的问题,要求某人澄清差异:)).

I'm trying to use Spring.NET's support for AOP to do dependency injection/inversion of control/aspect-oriented programming (sorry for the slew of buzzwords - maybe I'll post a separate question asking someone to clarify the difference :) ).

具体来说,我想拦截递归方法调用,以便每次调用该方法时,都会调用 AOP 通知/拦截器.

Specifically, I want to have intercept a recursive method call, so that every time that the method is invoked, the AOP advice/interceptor will be called.

除了第一个方法调用之外,Spring.Net 似乎没有拦截任何东西.我认为 Spring.Net 正在为每个实例维护 1 个拦截器链,并且在第一个方法调用完成之前不会再调用任何拦截器.

Spring.Net doesn't appear to intercept anything other than the very first method call. I think that Spring.Net is maintaining exactly 1 chain of interceptors per instance, and not call any more interceptors until that first method invocation has finished.

有没有人有关于为每个方法调用(包括递归调用)触发拦截器(建议)的任何信息?

Does anybody have any info about getting the interceptor (the advice) to be triggered for EVERY method invocation, including recursive calls?

如果有帮助,我可以提供代码/示例输出.谢谢!

I can provide code/example output, if that's helpful. Thanks!

推荐答案

参见 http://forum.springframework.net/showthread.php?t=5331

这篇关于向 Spring.Net 中的递归方法注入建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆