如何调试 Unity 容器“Resolve”?
我正在使用 MS Unity 容器进行依赖项注入,但“Resolve”返回意外结果。
有什么办法可以调试这个分辨率吗?如果我可以查看容器中注册的类型/实例,那就太好了,但在使用 QuickWatch 时我看不到它的存储位置。如果我能让容器输出一些调试跟踪,这也会很有用。
有什么建议吗?
I'm using the MS Unity container to do dependency injection, but a "Resolve" is returning unexpected results.
Is there an way I can debug this resolution? It would be great if I could view what Types/Instances are registered in the container, but I can't see where this is stored when using QuickWatch. It would also be useful if I could get the container to output some debug Traces.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Unity 框架的源代码可从 http://unity.codeplex.com 下载。如果您将其包含在您的解决方案中并引用 Unity 项目而不是项目中已编译的 DLL,您将能够通过 Unity 源代码进行调试。
The source code for the Unity framework is available for download at http://unity.codeplex.com. If you include it in your solution and reference the Unity projects instead of the compiled DLLs in your projects, you will be able to debug through the Unity source code.