using System; using System.Collections.Generic; using System.Text; namespace ScrewTurn.Wiki.PluginFramework { /// /// Contains information about a Provider. /// public class ComponentInformation { /// /// The Name of the Component. /// protected string name; /// /// The Author of the Component. /// protected string author; /// /// The component version. /// protected string version; /// /// The info URL of the Component/Author. /// protected string url; /// /// The component update URL which should point to a text file containing one or two rows (separated by \r\n or \n): /// 1. A list of increasing versions separated by pipes, such as "1.0.0|1.0.1|1.0.2" (without quotes) /// 2. (optional) The absolute HTTP URL of the latest DLL, for example "http://www.server.com/update/MyAssembly.dll" (without quotes) /// The second row should only be present if the provider can be updated automatically without any type of user /// intervention, i.e. by simply replacing the DLL and restarting the wiki. If the DLL contains multiple providers, /// they are all updated (obviously). The new DLL must have the same name of the being-replaced DLL (in other words, /// a provider must reside in the same DLL forever in order to be updated automatically). /// protected string updateUrl; /// /// Initializes a new instance of the ComponentInformation class. /// /// The Name of the Component. /// The Author of the Component. /// The component version. /// The info URL of the Component/Author. /// The update URL of the component, or null. public ComponentInformation(string name, string author, string version, string url, string updateUrl) { this.name = name; this.author = author; this.version = version; this.url = url; this.updateUrl = updateUrl; } /// /// Gets the Name of the Component. /// public string Name { get { return name; } } /// /// Gets the Author of the Component. /// public string Author { get { return author; } } /// /// Gets the component version. /// public string Version { get { return version; } } /// /// Gets the info URL of the Component/Author. /// public string Url { get { return url; } } /// /// Gets the update URL of the component. /// public string UpdateUrl { get { return updateUrl; } } } }