Depending on what you are trying to do, you can potentially also use System.ComponentModel.Composition.ReflectionModel.ReflectionModelServices, which were introduced by the API to support default directory caching. Assuming you are using a standard attributed programming model, and know that all of your [Export] are at the type level (that is, they are not members), then you can call GetPartType (part) for each part of your directory to get type.
As Daniel noted, if you use other programming models, this will not work for you, but if you use only the default directories that come with MEF, then it should do the job.
Wes haggard
source share