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