コード例 #1
0
        internal ConnectionManager(IPluginsLoader loader)
        {
            // RAS, // this protocol doesnt fit to the concept and seems to be broken
            var loaded = loader.Load();

            this.plugins = SortExternalPlugins(loaded);
        }
コード例 #2
0
        private void AddPluginCickEventHandler(object sender, EventArgs e)
        {
            PluginInfo pluginInfo = _pluginsLoader.Load();

            if (pluginInfo == null)
            {
                return;
            }

            if (ListOfPlugins.Items.Contains(pluginInfo.PluginName))
            {
                MessageBox.Show("Plugin already loaded", "Error.", MessageBoxButtons.OK);
                return;
            }

            _changesInfo.Added.Add(pluginInfo.PluginName);
            Plugins.Add(pluginInfo.PluginName, pluginInfo.PluginExecuter);
            ListOfPlugins.Items.Add(pluginInfo.PluginName);
        }