Hi,
I have a scenario with cocktail where I need to get access to the Mef Catalog to query the Part property (http://stackoverflow.com/questions/23497474/how-to-know-the-original-type-of-a-class-exported-as-an-interface-in-mef).
I need this information to implement the TargetGuard method of the INavigator. I check if an attribute decorate (or not) the class to allow (or refuse) the navigation.
I understand why it's not possible to publish this property as it's MEF dependant and the ICompositionProvider is "universal" for all type of IoC. But it's in some case really annoying to not have access to the catalog.
I also know I could write my own implementation of MEF and give it to cocktail but it looks it's a lot of work (need to redo the bootstrapper too) for just a small thing (in my point of view).
Could it be possible to add a class (dedicated to MEF) on Cocktail which, like EntityAspect.Wrap(), could wrap the cocktail MEF implementation and publish the Catalog ?
Right now I have a workaround but it's far to be clean. in the TargetGuard method, I create a new AggregateCatalog and fill it with the loaded assemblies. It would be nicer to use the catalog present in Cocktail
Edited by kdev - 07-May-2014 at 7:55am