示例#1
0
 public void RemovePlugin(Plugin plugin)
 {
     Plugins.Remove(plugin);
 }
示例#2
0
        public void AddPlugin(Plugin plugin)
        {
            Plugins.Add(plugin);

            if (plugin.Type == PluginType.Action)
            {
                Actions.Add(new StatementFactory(plugin.Description, StatementType.Action, () => new Action(plugin)));
            }
            else if (plugin.Type == PluginType.Event)
            {
                Events.Add(new StatementFactory(plugin.Description, StatementType.Event, () => new Event(plugin)));
            }
        }