【发布时间】:2013-07-28 07:01:32
【问题描述】:
我使用这个article 并在项目中创建了多个类库。我想将所有模块加载到内核中。
为了加载所有模块,我在 MainViewModel 中使用了这段代码
public MainViewModel()
{
IKernel kernel = new StandardKernel();
kernel.Load(AppDomain.CurrentDomain.GetAssemblies());
Plugins = kernel.GetAll<PluginBase>().ToList();
}
但不要在AppDomain.CurrentDomain.GetAssemblies() 中加载模块(插件)
【问题讨论】:
-
好的。还有什么问题?
-
不要加载我的模块。