public override IList<IResult> Get() { var rtn = new List<IResult>(); try { var tray = new CcTray(new EndpointImpl(new HttpGet(this.TimeoutInSeconds, this.Username, this.password), this.Url),new DateTimeNowImpl()); tray.Load(); var now = DateTime.Now; rtn.Add(this.TotalFailed(tray, now)); rtn.Add(this.Total(tray, now)); } catch (Exception ex) { this.Log.Error(ex.Message, ex); } return rtn; }
private Result TotalFailed(CcTray tray, DateTime now) { var totalFailed = new Result("TotalFailed", now, this.Path); totalFailed.SetValue(tray.FailedPipelines().Count); return totalFailed; }