我已经开始使用一个简单的插件加载程序来监视目录,如果其中的dll(s)包含IPlugin接口,则加载插件。foreach (Type type in assembly.GetExportedTypes()) if (type.IsClass && type.GetInterfacethis.ContainsKey(plugin.PluginName)) this[plugin.PluginName] = plugin;
}
我的问题是,我从历史上得到了与我们的旧DLL不同的结果,而当时只有很少的更改,并且我不知道这些更改与显示的错误是如何相关的。object of the interface we need the plugins to match
Type typeInterface = pluginType.GetInterface,每次使用Type typeInterface = pluginType.<em