Aug 27, 2010 at 9:55 PM
Edited Aug 27, 2010 at 10:00 PM
I am porting a plug-in based architecture to MEF.
In code, I obtain a specific Type (one which implements IPlugin and is derrived from UIElement) which I am supposed to instantiate and then display in my UI (in a new tab).
I know how to instantiate the plug-in instance and then compose it using my MEF container.
I should probably be happy with that and just let it go, but it bothers me that I can't get to the [Import] members from the constructor (since it is called before the compose). I'd like to be able to give my plug-in developers the option of using
It seems like MEF has all the machinery to take my type and make an instance, passing in all the constructor parameters to the [ImportingConstructor], but I can't understand how to get MEF to perform the task.
Thanks in advance for your input :)