I have a number of folders that all contains MEF parts that should be imported. Is the easiest way to find all the parts to iterate over the folders and create a MEF Aggregating Catalog object?
I need to place the parts in different places in the application based on the folder it was read from. So parts from folder "Test1Parts" should be places under the "Test1" section of the application. Do I have the folder name available somehow or will they all look the same once imported via the Aggregating Catalog?
I have generic parts so I can't really put a attribute on each of them an recompile just to have them show up on a different section in the application.
Another way (if it can't be controlled via the folder structure) is f course to use a configuration file that I read before importing telling what part should go where.
What would be the best approach?