/// <summary> /// Uninstalls the plugin associated with the ID /// </summary> /// <param name="ID">The identifier.</param> /// <returns>Returns true if it is uninstalled successfully, false otherwise</returns> public bool UninstallPlugin(string ID) { Contract.Requires <ArgumentNullException>(!string.IsNullOrEmpty(ID), "ID"); var TempPlugin = PluginList.Get(ID); if (TempPlugin == null) { return(true); } var User = HttpContext.Current.Chain(x => x.User).Chain(x => x.Identity).Chain(x => x.Name, ""); Utilities.IO.Log.Get().LogMessage("Plugin {0} is being uninstalled by {1}", MessageType.Debug, ID, User); TempPlugin.Delete(); Utilities.IO.Log.Get().LogMessage("Plugin {0} has been uninstalled by {1}", MessageType.Debug, ID, User); PluginList.Remove(TempPlugin); PluginList.Save(); return(true); }