private bool isPatchApplied(string uuid, Host host)
 {
     if (Helpers.ElyOrGreater(host))
     {
         return host.AppliedUpdates().Any(u => u != null && string.Equals(u.uuid, uuid, StringComparison.InvariantCultureIgnoreCase));
     }
     else
     {
         List<Pool_patch> hostPatches = host.AppliedPatches();
         foreach (Pool_patch patch in hostPatches)
         {
             if (string.Equals(patch.uuid, uuid, StringComparison.OrdinalIgnoreCase))
             {
                 return true;
             }
         }
     }
     return false;
 }
Пример #2
0
        private string hostAppliedPatches(Host host)
        {
            List<string> result = new List<string>();

            if (Helpers.ElyOrGreater(host))
            {
                foreach (var update in host.AppliedUpdates())
                    result.Add(update.Name);
            }
            else
            {
                foreach (Pool_patch patch in host.AppliedPatches())
                    result.Add(patch.Name);
            }

            result.Sort(StringUtility.NaturalCompare);

            return string.Join("\n", result.ToArray());
        }