Hello all,
I am trying create such a plugin architecture that;
IPlugin: an interface that all plugins must implement.
NormalPlugin: a normal plugin.
ComplexPlugin: a plugin which, beside implementing the base methods, has some custom methods.
HostApp: an app that knows what an IPlugin is.
currently the host app will have ComplexPlugin at compile-time and will load the NormalPlugin dynamically. That's because host needs to have definitions in ComplexPlugin so it can call it's custom methods.
1) Are there any better methods for achieving this? because adding some plugins as reference to the host app at compile-time looks a little lame to me.
2) I tried using:
public interface IPlugin
{
object CallCustomMethod(string methodName, object[] parameters);
}
but still, if CallCustomMethod returns a complex type, the app will need to know that complex type to cast to.
thanks in advance