In the last days of 2010 Mark Seemann announced a Christmas challenge concerning MEF. MEF uses attributes to export objects and inject them later where needed. The challenge was to find a way how to export objects and inject them in constructors without using attributes. Personally I don’t have much experience with MEF because I have mostly worked with other DI containers like autofac and Ninject. I like puzzles like this so I started experimenting. The first thought I had when I saw the chanllenge was about fluent MEF. I knew there was already such a project but I didn’t know its progress. So I started investigating MEF’s extensibility points.
MEF offers a few ways for extensibility. Each of them has its pros and cons so you have to decide which one fits best in your solution. Continue Reading…