您如何在自己的代码中使用 IContainer/ISite/IComponent?
有各种关于使用 IContainer 和 ISite 的在线文档(例如 http://www.theserverside.net/tt/blogs/showblog.tss?id=pluginArchitectures),周围有一些模糊的例子,但我还没有遇到过真实的实例(除了winforms)它真正有用的地方。 我真的不知道它到底可以用来做什么,这并没有帮助。 有人使用 .NET 容器接口吗? 相应的类在他们自己的代码中,独立于winforms,你是如何使用它们的?
Possible Duplicate:
When and why should I implement IComponent, IContainer, and ISite?
There are various online docs about using IContainer and ISite (eg http://www.theserverside.net/tt/blogs/showblog.tss?id=pluginArchitectures), and there are vague examples around, but I haven't come across a real instance (other than winforms) where it is actually useful. It doesn't help that I don't really know what exactly it can be used for. Has anyone use the .NET container interfaces & corresponding classes in their own code, independantly of winforms, and how have you used them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些是面向组件的软件方法的面向组件的元素。 例如,视觉设计师就使用它们。
如果您希望构建可重用的软件组件 (IComponent),并且能够在各个领域中将组件调整为规范程序集 (IContainer),特别是在设计时/运行时框架 (Visualstudio) 的上下文中那么你就在那里...
These are the component oriented elements of a component oriented approach to software. The visual designer, for example, uses them.
If you wish to build reusable software components (IComponent), and have the ability to adapt (ISite) the component in various domains as a canonical assembly (IContainer), specially in context of a design-time/run-time framework (visualstudio) then there you are ...