private async Task ProcessCloseDocumentIfNeededAsync( ImmutableArray <IIncrementalAnalyzer> analyzers, WorkItem workItem, TextDocument textDocument, bool isOpen, CancellationToken cancellationToken ) { if ( isOpen || !workItem.InvocationReasons.Contains( PredefinedInvocationReasons.DocumentClosed ) ) { return; } SolutionCrawlerLogger.LogProcessCloseDocument( Processor._logAggregator, textDocument.Id.Id ); await Processor .RunAnalyzersAsync( analyzers, textDocument, workItem, DocumentCloseAsync, cancellationToken ) .ConfigureAwait(false); return;
private async Task ProcessCloseDocumentIfNeeded(ImmutableArray <IIncrementalAnalyzer> analyzers, WorkItem workItem, Document document, bool isOpen, CancellationToken cancellationToken) { if (isOpen || !workItem.InvocationReasons.Contains(PredefinedInvocationReasons.DocumentClosed)) { return; } SolutionCrawlerLogger.LogProcessCloseDocument(this.Processor._logAggregator, document.Id.Id); await RunAnalyzersAsync(analyzers, document, (a, d, c) => a.DocumentResetAsync(d, c), cancellationToken).ConfigureAwait(false); }