コード例 #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);
        }
コード例 #2
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);
        }
コード例 #3
0
        /// <summary>
        /// Mark plugin as uninstalled
        /// </summary>
        /// <param name="systemName">Plugin system name</param>
        public static void MarkPluginAsUninstalled(string systemName)
        {
            Guard.NotEmpty(systemName, nameof(systemName));

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

            if (installed)
            {
                installedPluginSystemNames.Remove(systemName);
            }

            PluginFileParser.SaveInstalledPluginsFile(installedPluginSystemNames);
        }
コード例 #4
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);
        }
コード例 #5
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);
        }