使用 StructureMap 时是否有方法检测和调试循环引用?

发布于 2024-07-26 16:01:57 字数 244 浏览 11 评论 0原文

最近我一直在使用大量较小的对象,因为它们更简单且更容易重用。 大多数时候,使用 StructureMap(很棒的工具,顺便说一句)将这些对象相互注入是没有任何问题的。 但偶尔,我会搞砸,我会以堆栈溢出异常(tm)的形式给自己一个很好的循环引用。

那么,除了检查自上次测试运行以来我最近所做的所有更改之外,StructureMap 是否提供了任何用于调试循环引用的机制,或者是否有一个简单的工具在这种情况下可能有用?

感谢大家!

Lately I've been using a larger number of smaller objects, because they are simpler and easier to reuse. Most of the time there isn't any problem injecting these objects into one another using StructureMap (great tool, btw). But occasionally, I f*** up, and I get myself a nice circular reference in the guise of a stack overflow exception(tm).

So other than going through all my recent changes since the last test run, does StructureMap provide any mechanism for debugging circular references, or is there a simple tool out there that could be useful in this situation?

Thanks everyone!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔戏命师 2024-08-02 16:01:57

ObjectFactory.AssertConfigurationIsValid(); 将检查您的图表并尝试实例化所有插入的类型。

ObjectFactory.AssertConfigurationIsValid(); will check your graph and attempt to instantiate all plugged types.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文