Nov 22, 2011 at 9:18 AM
Edited Nov 22, 2011 at 9:19 AM
No that's not what i mean here.
At the moment I have in my code:
Public Interface IPluginHost
So in a plugin I can execute the host subrotines via:
What I'm trying to say though (badly it seems!! :0) ) is that in my plugin at the moment the plugin has access to all of the above subs in the host app even if it doesnt need that feature for the plugin.
I was wondering if MEF would help somehow in being able to partition interfaces somehow so that plugins could only see what they need. Also perhaps I can introduce a new set of host "hooks" in alter release, adding to a new version of the
interface and recompiling.
Public Interface IPlugin
Property Host1() As IPluginHost1
Property Host2() As IPluginHost2
Public Interface IPluginHost1
Public Interface IPluginHost2
..set Host and Host2 properties to address of host app and then in plugin call as:
Obviously I could rename "HostX" to "ServiceX" maybe to be a bit nicer but still it doesnt feel right to me, and I was looking for a cleaner solution. It might not be MEF related at all rather my skill level
on doing this sort of thing with Interfaces but hey that's my question! :0)
I've don't have a problem recompiling the Interface as I add in new hooks as part of my main application development but what I dont want to do is break existing plugins if I do.