Пример #1
0
 private void AddNewIssues(IReadOnlyList <ILogFileIssue> 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);
             }
         }
     }
 }
Пример #2
0
        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);
            }
        }