Managed Extensibility Framework MEF, MEF2 是属于 .Net 基金会的一个项目,本文将简要介绍该项目相关的信息。
中文介绍内容翻译自英文介绍,主要采用意译、如与原文存在出入,请以原文为准。
Managed Extensibility Framework (MEF) 为大型应用程序提供了一个组合层,以改善应用程序的灵活性、可维护性和可测试性。
MEF 可用于作为“支持提三方插件”的扩展性,或者为常规应用程序带来松耦合、可插拔的优势。
MEF 是 Microsoft .NET Framework 的一部分,其类型主要都存在于 System.ComponentModel.Composition.* 名称空间之下。
MEF 可以被归类为一类 IOC 框架,其在微软的很多大型工程中得到应用,典型的以 Visual Studio 这样的大型应用程序。
不过在 IOC 框架方面,诸如 Autofac 、 StructureMap 和 Microsoft.DependencyInjection 之类的等等选择很多。因此,在微软的项目之外,用到 MEF 的似乎并不多见。
有趣的是,为了项目的特殊性, MEF 在微软中其实有至少三个不同的版本:Differences between .NET MEF, NuGet MEF and VS MEF
The Managed Extensibility Framework (MEF) is a composition layer for .NET that improves the flexibility, maintainability and testability of large applications. MEF can be used for third-party plugin extensibility, or it can bring the benefits of a loosely-coupled plugin-like architecture to regular applications. MEF is a part of the Microsoft .NET Framework, with types primarily under the System.ComponentModel.Composition.* namespaces.
以上《英文介绍》摘录自 .NET Foundation 的项目介绍 。原文受原项目许可证保护。