Beispiel #1
0
        private void ExecuteUninstallation(string packagePath, IPackageInfo packageInfo, PackageFileList fileList)
        {
            PackageLoader loader = new PackageLoader();

            loader.LoadPackage(packagePath);
            loader.Package.Initialize(this);
            PackageUninstaller uninstaller = new PackageUninstaller(packageInfo, fileList);

            // Start installing the package
            loader.Package.Uninstall(uninstaller);
            // Uninstallation complete! Add this package to the installed packages list
            int removalCount = MarkPackageUninstalled(uninstaller.Package.FullID);

            if (removalCount > 0)
            {
                SaveInstalledPackageList();
            }
            loader.Unload();
        }
Beispiel #2
0
 private void ExecuteUninstallation(string packagePath, IPackageInfo packageInfo, PackageFileList fileList)
 {
     PackageLoader loader = new PackageLoader();
     loader.LoadPackage(packagePath);
     loader.Package.Initialize(this);
     PackageUninstaller uninstaller = new PackageUninstaller(packageInfo, fileList);
     // Start installing the package
     loader.Package.Uninstall(uninstaller);
     // Uninstallation complete! Add this package to the installed packages list
     int removalCount = MarkPackageUninstalled(uninstaller.Package.FullID);
     if (removalCount > 0) {
         SaveInstalledPackageList();
     }
     loader.Unload();
 }