private async Task <ImmutableArray <TextChange> > GetCodeCleanupAndFormatChangesAsync( Document document, ICodeCleanupService codeCleanupService, IProgressTracker progressTracker, CancellationToken cancellationToken) { var newDoc = await codeCleanupService.CleanupAsync( document, progressTracker, cancellationToken).ConfigureAwait(false); var changes = await newDoc.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false); return(changes.ToImmutableArrayOrEmpty()); }
private async Task <IEnumerable <TextChange> > GetCodeCleanupAndFormatChangesAsync(Document document, ICodeCleanupService codeCleanupService, CancellationToken cancellationToken) { var newDoc = await codeCleanupService.CleanupAsync(document, cancellationToken).ConfigureAwait(false); return(await newDoc.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false)); }