Esempio 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.Any(x => x.IsCaseInsensitiveEqual(systemName));

            if (alreadyMarkedAsInstalled)
            {
                installedPluginSystemNames.Remove(systemName);
            }
            PluginFileParser.SaveInstalledPluginsFile(installedPluginSystemNames, _installedPluginsFilePath);
        }
Esempio 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.Any(x => x.IsCaseInsensitiveEqual(systemName));

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