Data Class for Available Plugin. Holds and instance of the loaded Plugin, as well as the Plugin's Assembly Path
Ejemplo n.º 1
0
        /// <summary>
        /// Finds a plugin in the available Plugins
        /// </summary>
        /// <param name="pluginNameOrPath">The name or File path of the plugin to find</param>
        /// <returns>Available Plugin, or null if the plugin is not found</returns>
        public AvailablePlugin Find(string pluginNameOrPath)
        {
            AvailablePlugin r = null;

            //Loop through all the plugins
            foreach (AvailablePlugin pluginOn in this.List)
            {
                //Find the one with the matching name or filename
                if ((pluginOn.Instance.Name.Equals(pluginNameOrPath)) || pluginOn.AssemblyPath.Equals(pluginNameOrPath))
                {
                    r = pluginOn;
                    break;
                }
            }
            return(r);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Remove a Plugin to the collection of Available plugins
 /// </summary>
 /// <param name="pluginToRemove">The Plugin to Remove</param>
 public void Remove(AvailablePlugin p)
 {
     this.List.Remove(p);
 }
Ejemplo n.º 3
0
 //A Simple Home-brew class to hold some info about our Available Plugins
 /// <summary>
 /// Add a Plugin to the collection of Available plugins
 /// </summary>
 /// <param name="pluginToAdd">The Plugin to Add</param>
 public void Add(AvailablePlugin p)
 {
     this.List.Add(p);
 }
Ejemplo n.º 4
0
        //A Simple Home-brew class to hold some info about our Available Plugins

        /// <summary>
        /// Add a Plugin to the collection of Available plugins
        /// </summary>
        /// <param name="pluginToAdd">The Plugin to Add</param>
        public void Add(AvailablePlugin p)
        {
            this.List.Add(p);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Remove a Plugin to the collection of Available plugins
 /// </summary>
 /// <param name="pluginToRemove">The Plugin to Remove</param>
 public void Remove(AvailablePlugin p)
 {
     this.List.Remove(p);
 }