.NET 应用程序的插件管理器?
是否有适用于 .NET 应用程序的插件管理器?我想用 C# 或 VB.Net 构建程序的“核心”,然后能够使用某种插件管理器/组合脚本和 GUI 来扩展它。
那里有类似的东西吗?
Is there any addon-manager for .NET-applications? I would like to build the "core" of my program with C# or VB.Net and then be able to extend it using some kind of addon-manager/combined scripting and GUI.
Is there anything like that out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Microsoft 拥有专为执行此操作而构建的托管扩展性框架 (MEF)。 MEF 作为 .NET 4 的一部分提供。来自 CodePlex 站点:
托管可扩展性框架简化了可扩展应用程序的创建。 MEF 提供发现和组合功能,您可以利用这些功能来加载应用程序扩展。
MEF 解决什么问题?
MEF 提供了一个简单的解决方案
运行时扩展性问题。
到目前为止,任何应用程序
想要支持插件模型
需要创建自己的
基础设施从头开始。那些
插件通常是
特定于应用程序并且不能
跨多个重用
实施。
主机应用程序的标准方式
暴露自己并消耗外部
扩展。扩展,由他们
自然,可以重复使用
不同的应用。然而,一个
延期仍可实施
以某种方式
特定于应用程序。扩展
他们自己可以互相依赖
MEF 将确保它们已连线
以正确的顺序在一起
(另一件事你不必
担心)。
为您的发现方法
应用程序定位和加载
可用的扩展。
使用附加标记扩展
元数据有助于丰富
查询和过滤
Microsoft has the Managed Extensibility Framework (MEF) that is built to do this. MEF is available as part of .NET 4. From the CodePlex site:
The Managed Extensibility Framework simplifies the creation of extensible applications. MEF offers discovery and composition capabilities that you can leverage to load application extensions.
What problems does MEF solve?
MEF presents a simple solution for
the runtime extensibility problem.
Until now, any application that
wanted to support a plugin model
needed to create its own
infrastructure from scratch. Those
plugins would often be
application-specific and could not be
reused across multiple
implementations.
standard way for the host application
to expose itself and consume external
extensions. Extensions, by their
nature, can be reused amongst
different applications. However, an
extension could still be implemented
in a way that is
application-specific. Extensions
themselves can depend on one another
and MEF will make sure they are wired
together in the correct order
(another thing you won't have to
worry about).
discovery approaches for your
application to locate and load
available extensions.
tagging extensions with additonal
metadata which facilitates rich
querying and filtering