Is there a way to add exported parts from a catalog to an existing MEF CompositionContainer? I'm aware of ComposeExportedValue extension method, but what if I wanted to add a whole DirectoryCatalog to the list of exports? I don't need recomposition in this case, btw.
+1
A:
You can call DirectoryCatalog.Refresh to pick up new assemblies in a folder. To add entirely new catalogs, you could pass an AggregateCatalog to the container and then call .Add
on AggregateCatalog.Catalogs.
Wim Coenen
2010-08-24 13:28:27
I'm surprised I overlooked this. Thanks a lot.
Dmitry Ornatsky
2010-08-24 14:43:07