protected void onPluginListChanged(PluginListChangedEventArgs <T> e) { PluginListChangedEventHandler <T> handler = PluginListChanged; if (handler != null) { handler(this, e); } }
private void UnLoadDll(string fileName) { foreach (T plugin in PluginsInDll(fileName)) { this.Plugins.Remove(plugin.PluginName); PluginListChangedEventArgs <T> ec = new PluginListChangedEventArgs <T>(Plugins); this.onPluginListChanged(ec); PluginUnLoadedEventArgs <T> e = new PluginUnLoadedEventArgs <T>(plugin); this.onPluginUnLoaded(e); } }
private void LoadDll(string fileName) { foreach (T plugin in PluginsInDll(fileName)) { if (!Plugins.ContainsKey(plugin.PluginName)) { this.Plugins.Add(plugin.PluginName, plugin); PluginListChangedEventArgs <T> ec = new PluginListChangedEventArgs <T>(Plugins); this.onPluginListChanged(ec); PluginLoadedEventArgs <T> e = new PluginLoadedEventArgs <T>(plugin); this.onPluginLoaded(e); } } }