示例#1
0
 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);
             }
         }
     }
 }
示例#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);
            }
        }