I googled and got only a few articles about MEF. Would someone please explain in brief:
Any step by step guidance will be helpful, thanks!
For those who don't know, the Managed Extensibility Framework (MEF) is alive and well, and has been ported to . NET Core as System.
This article shows how to use the built-in dependency injection. The Managed Extensibility Framework (MEF) is a built-in set of elements that allows you to “export” and “import” objects across projects that allows you to not rely on hard dependencies.
MEF allows you to design a system that can be extended.
In my experience, you can design interfaces, create libraries that have implementations of those interfaces, and load them dynamically at runtime.. You can also determine how those extensions should be loaded - in the same application domain, or a new one, etc. You can point it at a directory and tell it to get all of the implementations of a certain interface, and load those to use in your application..
So, because your application doesn't need to know all of its features up front and can load them dynamically, you can say it is "extensible"..
Alternatively, there is also MAF, the Managed Add-in Framework, or the System.AddIn namespace in .NET. This has some overlap, but is more targeted toward an Add-In or Plug-in model. It has features for managing versioning, and handling backward compatibility between hosts and add-ins each with different versions of the interface.
To get started with MEF, I think the best place is probably here : http://www.codeplex.com/MEF
There is a lot of information there on getting started, documentation, and even a forum...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With