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); } }
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); } }