public IEnumerable <HealthIssue> GetHealthIssues() { var issues = new HealthIssuesCollection(); if (_balanceService.GetLastJobError() != null) { issues.Add(JobExecutionIssueType, _balanceService.GetLastJobError()); } if (_txHistoryService.GetLastJobError() != null) { issues.Add(JobExecutionIssueType, _txHistoryService.GetLastJobError()); } if (_transactionService.GetLastJobError() != null) { issues.Add(JobExecutionIssueType, _transactionService.GetLastJobError()); } return(issues); }
public string GetHealthViolationMessage() { List <string> issues = new List <string>(); if (_balanceService.GetLastJobError() != null) { issues.Add(_balanceService.GetLastJobError()); } if (_txHistoryService.GetLastJobError() != null) { issues.Add(_txHistoryService.GetLastJobError()); } if (_transactionService.GetLastJobError() != null) { issues.Add(_transactionService.GetLastJobError()); } if (issues.Count > 0) { return(string.Join(",\n", issues.ToArray())); } return(null); }