private void AddNewIssues(IReadOnlyList <ILogSourceIssue> currentIssues) { foreach (var issue in currentIssues) { if (!_viewModelsByIssue.ContainsKey(issue)) { var viewModel = new IssueViewModel(issue, GoToIssue); _viewModelsByIssue.Add(issue, viewModel); _allIssues.Add(viewModel); if (MatchesFilter(viewModel)) { _filteredIssues.Add(viewModel); } } } }
private bool MatchesFilter(IssueViewModel issue) { switch (issue.Severity) { case Severity.Critical: return(_showCritical); case Severity.Major: return(_showMajor); case Severity.Minor: return(_showMinor); default: return(false); } }