Exemple #1
0
        private void ServePackagesToUninstall()
        {
            GlobalProgressMessage = string.Format("Removing packages...");

            var packagesToUnisntall = KoinoniaSettings.PackagesToUninstall
                                      .Where(id => InstalledPackages.FirstOrDefault(p => p.Id == id) != null)
                                      .Select(id => InstalledPackages.FirstOrDefault(p => p.Id == id)).ToArray();

            foreach (var package in packagesToUnisntall)
            {
                package.Uninstall();
            }

            KoinoniaSettings.PackagesToUninstall.Clear();
            Settings.Commit();

            foreach (var package in packagesToUnisntall)
            {
                DeletePackageFiles(package);
            }

            ThreadingUtils.DispatchOnMainThread(AssetDatabase.Refresh);
        }
 public PackageKey GetLoose(PackageKey packageKey) => InstalledPackages.FirstOrDefault(p => p.LooseEquals(packageKey));