private bool CheckForConflicts(Package[] installedPackages) { bool hasConflicts = installedPackages.Any(p => p.HasConflict); if (!hasConflicts) { return(true); } var conflicts = UpdateMgr.GetConflictPackageList(installedPackages); DisplayMgr.List("PACKAGE CONFLICTS", conflicts, displayDetails: true); Console.WriteLine(); Console.WriteLine("Conflicting Package Versions Exist. Enter 'Y' to Fix:"); var input = Console.ReadLine(); if (input == "Y") { UpdateMgr.ApplyProjectUpdate(conflicts, new string[] {}); return(true); } return(false); }
private bool CheckForUpdates(Package[] installedPackages) { bool hasUpdates = installedPackages.Any(p => p.HasUpdate); if (!hasUpdates) { return(false); } var updates = UpdateMgr.GetUpdatePackageList(installedPackages); DisplayMgr.List("PACKAGE UPDATES", updates); Console.WriteLine(); Console.WriteLine("Updated Package Versions Exist. Enter 'Y' to Update:"); var input = Console.ReadLine(); if (input == "Y") { Console.WriteLine("[Enter] for all packages."); Console.WriteLine("...or comma separated list of package names starting with:"); var names = Console.ReadLine().Replace(" ", "").Split(','); UpdateMgr.ApplyProjectUpdate(updates, names); return(true); } return(false); }