Esempio n. 1
0
 private void RemoveBuildRelease(Build b)
 {
     if (BuildRelease.Any())
     {
         var oldbr = BuildRelease.FirstOrDefault(x => x.Id == b.Id);
         if (oldbr != null)
         {
             BuildRelease.Remove(oldbr);
         }
     }
 }
Esempio n. 2
0
 protected string CalcMaxWaitTime()
 {
     if (!BuildRelease.Any(x => x.Finish == null && !x.Release))
     {
         return(string.Empty);
     }
     else
     {
         try
         {
             return(BuildRelease
                    .OrderByDescending(x => x.Queue)
                    .Take(50)
                    .Where(x => x.Finish == null && !x.Release)
                    .Max(x => x.Wait)
                    .ToString(@"hh\:mm\:ss"));
         }
         catch
         {
             return(string.Empty);
         }
     }
 }