I am a Java person, but since your question is related to software development patterns ...
A strategy template will probably help you here on a very abstract level. So, perhaps your main application has a very simple set of “strategies” that it uses to work ... instead of, say, creating a menu bar, you call a simple menu bar strategy object to create it for you. Then specify the methods for the swap strategies (so the deployment of the plugin will essentially consist of calling a bunch of setStrategy () methods on the affected objects, or whatever you like). The plugin will provide alternative strategies. As for loading plugin classes at runtime, I'm not familiar enough with C # to answer this question.
As I said, all this is very abstract. Try to avoid reflection as much as possible - although sometimes it is necessary, there are problems with the performance, security and design of using reflection.
Hope this helps!
source share