温莎城堡 ILazyComponentLoader 递归

发布于 2024-10-01 07:16:18 字数 189 浏览 2 评论 0原文

温莎城堡的 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 技术交流群。

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

发布评论

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

评论(1

轮廓§ 2024-10-08 07:16:18

不,你必须在某个地方划清界限。 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.

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