Addon-managers for .NET-applications?
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 an开发者_如何学Cything like that out there?
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.
- MEF provides a 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).
- MEF offers a set of discovery approaches for your application to locate and load available extensions.
- MEF allows tagging extensions with additonal metadata which facilitates rich querying and filtering
精彩评论