예제 #1
0
        protected void onPluginListChanged(PluginListChangedEventArgs <T> e)
        {
            PluginListChangedEventHandler <T> handler = PluginListChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
                }
            }
        }