ProgressMonitorStatusMessage GetUninstallingStatusMessages(List <INuGetPackageAction> packageActions)
 {
     if (packageActions.Count == 1)
     {
         string packageId = packageActions.OfType <INuGetPackageAction> ().First().PackageId;
         return(ProgressMonitorStatusMessageFactory.CreateRemoveSinglePackageMessage(packageId));
     }
     return(ProgressMonitorStatusMessageFactory.CreateRemovingMultiplePackagesMessage(packageActions.Count));
 }
Example #2
0
        static ProgressMonitorStatusMessage GetProgressMonitorUninstallMessages(List <IPackageAction> packageActions)
        {
            int count = packageActions.Count;

            if (count == 1)
            {
                string packageId = packageActions.Cast <INuGetPackageAction> ().First().PackageId;
                return(ProgressMonitorStatusMessageFactory.CreateRemoveSinglePackageMessage(packageId));
            }

            return(new ProgressMonitorStatusMessage(
                       GettextCatalog.GetString("Removing {0} packages...", count),
                       GettextCatalog.GetString("{0} packages successfully removed.", count),
                       GettextCatalog.GetString("Could not remove packages."),
                       GettextCatalog.GetString("{0} packages removed with warnings.", count)
                       ));
        }