protected override async Task <IEnumerable <CodeActionOperation> > ComputeOperationsAsync(CancellationToken cancellationToken) { FixAllLogger.LogContext(_fixAllContext, IsInternalCodeFixProvider(_fixAllContext.CodeFixProvider)); var service = _fixAllContext.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); return(await service.GetFixAllOperationsAsync(_fixAllProvider, _fixAllContext).ConfigureAwait(false)); }
protected override async Task <IEnumerable <CodeActionOperation> > ComputeOperationsAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogContext(_fixAllContext, IsInternalCodeFixProvider(_fixAllContext.CodeFixProvider)); var service = _fixAllContext.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); // Use the new cancellation token instead of the stale one present inside _fixAllContext. return(await service.GetFixAllOperationsAsync(_fixAllProvider, _fixAllContext.WithCancellationToken(cancellationToken)).ConfigureAwait(false)); }
protected async override Task <Solution> GetChangedSolutionAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogContext(_fixAllContext, IsInternalCodeFixProvider(_fixAllContext.CodeFixProvider)); var service = _fixAllContext.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); // Use the new cancellation token instead of the stale one present inside _fixAllContext. return(await service.GetFixAllChangedSolutionAsync(_fixAllProvider, _fixAllContext.WithCancellationToken(cancellationToken), FixAllWaitDialogAndPreviewChangesTitle, ComputingFixAllWaitDialogMessage).ConfigureAwait(false)); }