Skip to content

Commit

Permalink
Properly pass progress object along in fix all provider (#77243)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi authored Feb 15, 2025
2 parents 9af27d3 + 5d046a0 commit 567599f
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,11 @@ private sealed class FixAllCodeAction(Func<CodeActionPurpose, IProgress<CodeAnal
{
private readonly Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution;

protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken)
protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
{
var changedSolution = await _createChangedSolution(
CodeActionPurpose.Preview, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
if (changedSolution is null)
return [];

return new CodeActionOperation[] { new ApplyChangesOperation(changedSolution) };
CodeActionPurpose.Preview, progress, cancellationToken).ConfigureAwait(false);
return changedSolution is null ? [] : [new ApplyChangesOperation(changedSolution)];
}
}
}
Expand Down

0 comments on commit 567599f

Please sign in to comment.