Пример #1
0
 /// <summary>
 /// Adds a plugin to this manager
 /// </summary>
 /// <param name="plugin"></param>
 public bool AddPlugin(Plugin plugin)
 {
     if (loadedPlugins.ContainsKey(plugin.Name))
     {
         return(false);
     }
     loadedPlugins.Add(plugin.Name, plugin);
     plugin.HandleAddedToManager(this);
     OnPluginAdded?.Invoke(plugin);
     return(true);
 }
Пример #2
0
 /// <summary>
 /// Fires the OnPluginAdded event
 /// </summary>
 /// <param name="name"></param>
 protected void FirePluginAdded(string name) => OnPluginAdded?.Invoke(name);