/// <summary> /// Adds the specified plugin to the list of managed plugins. /// </summary> /// <param name="p_strPluginPath">The path to the plugin to add.</param> /// <returns><c>true</c> if the specified plugin was added; /// <c>false</c> otherwise.</returns> public bool AddPlugin(string p_strPluginPath) { bool booSuccess = ManagedPluginRegistry.RegisterPlugin(p_strPluginPath); if (booSuccess) { PluginOrderLog.SetPluginOrderIndex(ManagedPluginRegistry.GetPlugin(p_strPluginPath), PluginOrderLog.OrderedPlugins.Count); } return(booSuccess); }
/// <summary> /// Sets the order of the plugins to the given order. /// </summary> /// <remarks> /// If the given list does not include all registered plugins, then the plugins are ordered in a manner /// so as to not displace the positions of the plugins whose order was not specified. /// </remarks> /// <param name="p_lstOrderedPlugins">The list indicating the desired order of the plugins.</param> public void SetPluginOrder(IList <Plugin> p_lstOrderedPlugins) { PluginOrderLog.SetPluginOrder(p_lstOrderedPlugins); }
/// <summary> /// Sets the load order of the specifid plugin. /// </summary> /// <param name="p_plgPlugin">The plugin whose load order is to be set.</param> /// <param name="p_intNewIndex">The new load order index of the plugin.</param> public void SetPluginOrderIndex(Plugin p_plgPlugin, int p_intNewIndex) { PluginOrderLog.SetPluginOrderIndex(p_plgPlugin, p_intNewIndex); }
/// <summary> /// Removes the given plugin from the list of managed plugins. /// </summary> /// <param name="p_plgPlugin">The plugin to remove.</param> public void RemovePlugin(Plugin p_plgPlugin) { ActivePluginLog.DeactivatePlugin(p_plgPlugin); PluginOrderLog.RemovePlugin(p_plgPlugin); ManagedPluginRegistry.UnregisterPlugin(p_plgPlugin); }