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);
        }
Esempio n. 2
0
        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);
        }