Пример #1
0
 private static bool WriteStatus(ReferenceStatus status)
 {
   List<string> flags = new List<string>();
   if (status.IsProjectMissing)
   {
     flags.Add("Missing Project");
   }
   if (status.IsReferencedVersionMissing)
   {
     flags.Add("Missing Version");
   }
   if (status.IsHealthy)
   {
     if (status.IsOutdated)
     {
       flags.Add("Outdated");
     }
     if (!status.IsReferencedVersionInstalled)
     {
       flags.Add("NeedsUnpackage");
     }
     if (!status.IsAnyVersionInstalled)
     {
       flags.Add("NothingInstalled");
     }
     else if (status.IsOlderVersionInstalled)
     {
       flags.Add("OlderVersionInstalled");
     }
   }
   List<string> parts = new List<string>();
   parts.Add("  " + status.DependencyName);
   if (!status.ReferencedVersionTags.Empty)
   {
     parts.Add("(" + status.ReferencedVersionTags + ")");
   }
   if (flags.Count > 0)
   {
     parts.Add("(" + flags.Join(", ") + ")");
   }
   Console.WriteLine(parts.ToArray().Join(" "));
   return !status.IsHealthy;
 }
Пример #2
0
 protected BrokenProjectReference(ReferenceStatus status)
 {
   _status = status;
 }