void CheckAll() { foreach (var issue in IssueList) { if (IsDisposing) { return; } issue.Check(); if (IsDisposing) { return; } // If issue is critical then... if (issue.IsEnabled && issue.Severity.HasValue && issue.Severity.Value >= IssueSeverity.Critical) { // Skip checking other issues. break; } } HasIssues = IssueList.Any(x => x.IsEnabled && x.Severity.HasValue && x.Severity.Value > IssueSeverity.Critical); var ev = CheckCompleted; if (ev != null) { CheckCompleted(this, new EventArgs()); } }
void CheckAll() { // Make sure that issues are checked in correct order. var issues = IssueList.OrderBy(x => x.OrderId).ToArray(); foreach (var issue in issues) { if (IsDisposing) { return; } issue.Check(); if (IsDisposing) { return; } // If issue is critical then... if (issue.IsEnabled && issue.Severity.HasValue && issue.Severity.Value >= IssueSeverity.Critical) { // Skip checking other issues. break; } } HasIssues = IssueList.Any(x => x.IsEnabled && x.Severity.HasValue && x.Severity.Value >= IssueSeverity.Critical); var ev = CheckCompleted; if (ev != null) { CheckCompleted(this, new EventArgs()); } }