Esempio n. 1
0
 protected string CountNumberOfAgents()
 {
     return(BuildRelease
            .OrderByDescending(x => x.Queue)
            .Take(50)
            .Count(x => x.Start != null && x.Finish == null && !x.Release)
            .ToString());
 }
Esempio n. 2
0
 protected string CountWaitingJobs()
 {
     return(BuildRelease
            .OrderByDescending(x => x.Queue)
            .Take(50)
            .Count(x => x.Start == null && x.Finish == null && !x.Release)
            .ToString());
 }
Esempio n. 3
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);
         }
     }
 }