Reputation: 850
I've been looking everywhere for an example or something like this, without any luck so i hope someone here can put me in the right direction.
I have a WPF application that i want to build plugins/DLC/add-in (not sure what the right word is to search on when it is WPF so i'll use Plugin).
I haven't build any plugins yet, because i thought there might be a smart nuget package
or a pattern
to use.
So essentially i want something that are not as tedious as (I know this is so simplified...):
if(myFolderPath contains "plugin.dll")
{
AddAMenuButtonWithThePlugin();
}
I'm hoping for maybe some kind of AnnotationMethod
like:
[UseThisDll("plugin.dll")]
private void AddAMenuButtonWithThePlugin(){...}
If you have had a similar task before i would like to hear how you solved this as i don't find my own ideas that easy for me to pull off.
Basically i have multiple PC's with the WPF that are using Squirrel.Windows
for the install and update.
However i have some plugins that maybe only some of the PC's should have.
Any good advice? Basically i want to add a button
to a page
that will lead it to the DLC page
.
Upvotes: 1
Views: 1814
Reputation:
You can use MEF for this.
There are a few versions of MEF:
Upvotes: 2