温莎城堡 ILazyComponentLoader 递归
温莎城堡的 ILazyComponentLoader 是递归的吗?也就是说,如果延迟加载的组件具有依赖项,Windsor 是否也会尝试延迟加载该依赖项?
如果没有,有人可以建议一种方法吗?
如果是这样...我似乎无法完成这项工作...在延迟加载无法满足依赖项的第一个组件后,我不断收到错误...有什么想法吗?
谢谢。
Is the ILazyComponentLoader for Castle Windsor recursive? That is, if the lazy loaded component has a dependency, will Windsor try to lazy load that dependency as well?
If not, can someone suggest a way of doing this?
If so...I can't seem to make this work...I keep getting an error after lazy loading the first component that a dependency cannot be satisfied...any ideas?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,你必须在某个地方划清界限。
ILazyComponentLoaders
一般而言,是在非常非常罕见的情况下使用的,即您确实完全没有办法预先注册组件的情况。我认为拥有一个本身具有满足上述标准的依赖项的
ILazyComponentLoader
的机会非常小,以至于您更有可能被陨石击中而死亡。换句话说——你做错了。
No. You have to draw a line somewhere.
ILazyComponentLoaders
in general are meant to be used in very, very, very rare cases, when you seriously genuinely have absolutely no way whatsoever to pre-register the components.I think the chance of having a
ILazyComponentLoader
that itself has dependencies meeting aforementioned criteria are so slim that you are more likely to die being hit by a meteorite.In other words - you're doing it wrong.