Ejemplo n.º 1
0
        /// <summary>
        /// Mark plugin as uninstalled
        /// </summary>
        /// <param name="systemName">Plugin system name</param>
        public static void MarkPluginAsUninstalled(string systemName)
        {
            Guard.ArgumentNotEmpty(() => systemName);

            var  installedPluginSystemNames = GetInstalledPluginNames();
            bool alreadyMarkedAsInstalled   = installedPluginSystemNames.Contains(systemName);

            if (alreadyMarkedAsInstalled)
            {
                installedPluginSystemNames.Remove(systemName);
            }
            PluginFileParser.SaveInstalledPluginsFile(installedPluginSystemNames);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Mark plugin as installed
        /// </summary>
        /// <param name="systemName">Plugin system name</param>
        public static void MarkPluginAsInstalled(string systemName)
        {
            if (String.IsNullOrEmpty(systemName))
            {
                throw new ArgumentNullException("systemName");
            }

            var  installedPluginSystemNames = GetInstalledPluginNames();
            bool alreadyMarkedAsInstalled   = installedPluginSystemNames.Contains(systemName);

            if (!alreadyMarkedAsInstalled)
            {
                installedPluginSystemNames.Add(systemName);
            }
            PluginFileParser.SaveInstalledPluginsFile(installedPluginSystemNames);
        }