开发者

Call Host method from IPlugin

I'm currently building a plugin system using IPluginInterface. The plugins include the whole logic, the host just enables/disables the plugins and configures them.

However, there are certain Host methods I sh开发者_运维技巧ould be able to call from a plugin. I've tested various ideas, but none of them seems to work fine.

How can I achieve this?


Have the host implementing IHost ( somethin like this ), have the plugin exposing a function ( ie Initizialize(IHost host) ) and pass the host to the plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜