Conventions

Jul 26, 2011 at 10:57 PM

I'm very interested in the new convention-based features in MEF.

Are there any samples included in the download?

So far the best example of any kind I've found is here: http://blogs.msdn.com/b/hammett/archive/2011/03/08/mef-s-convention-model.aspx

Jul 27, 2011 at 3:44 PM
Edited Jul 27, 2011 at 3:58 PM

If you're wondering what I'm trying to do, take a look at my SO question here.

Basically I want to export all classes implementing IView named as their class name minus the namespaces.

Then when any IView is imported (composed), I want to set the DataContext property of that view by importing an object with the same name but appending "Model" on the end.

Can this be done?