ExportFactory<T> in MEF 2 [Alok]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. In the first version of MEF there are only two notions of lifetime: A shared global lifetime or a per instance lifetime. In MEF 2 Preview 4 new support has been added to enable…


Using MEF 2 with ASP.NET MVC 3 [Nick]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. The latest MEF preview includes a new assembly, System.ComponentModel.Composition.Web.Mvc.CodePlex.dll, that simplifies the task of building flexible, testable and maitainable ASP.NET MVC web applications. To achieve this it: provides dependency injection for Controller classes, defines…


Overriding part registration conventions with the MEF attributes [Nick]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. One of the big advances made in the new MEF preview is a convention-driven programming model aimed at eliminating repetitive attribute usage. In this new model, the MEF attributes like Export and Import have…


Getting started with convention-based part registration in MEF 2 [Nick]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. MEF ‘version 1’ uses attributes to describe how a type should be handled for composition purposes. [Export, PartCreationPolicy(CreationPolicy.NonShared)] public class HomeController : Controller { [ImportingConstructor] public HomeController(/* Dependencies here */) { … } public…