示例#1
0
        private async Task HandleAnalyzable(IAnalyzable item, AnalysisPriority priority, CancellationToken cancellationToken)
        {
            if (item is IGroupableAnalysisProjectEntry groupable)
            {
                var added = _enqueuedGroups.Add(groupable.AnalysisGroup);
                if (added)
                {
                    Enqueue(new GroupAnalysis(groupable.AnalysisGroup, this), priority);
                }

                groupable.Analyze(cancellationToken, true);
            }
            else
            {
                item.Analyze(cancellationToken);
            }
        }
示例#2
0
        private async Task HandleAnalyzable(IAnalyzable item, AnalysisPriority priority, CancellationToken cancellationToken)
        {
            if (item is IGroupableAnalysisProjectEntry groupable)
            {
                var added = _enqueuedGroups.Add(groupable.AnalysisGroup);
                if (added)
                {
                    try {
                        Enqueue(new GroupAnalysis(groupable.AnalysisGroup, this), priority);
                    } catch (ObjectDisposedException) when(_ppc.IsDisposed)
                    {
                        return;
                    }
                }

                groupable.Analyze(cancellationToken, true);
            }
            else
            {
                item.Analyze(cancellationToken);
            }
        }