internal sealed override Task <Solution> GetChangedSolutionAsync( IProgressTracker progressTracker, CancellationToken cancellationToken ) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogState( FixAllState, IsInternalCodeFixProvider(FixAllState.CodeFixProvider) ); var service = FixAllState.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); var fixAllContext = new FixAllContext(FixAllState, progressTracker, cancellationToken); if (progressTracker != null) { progressTracker.Description = FixAllContextHelper.GetDefaultFixAllTitle( fixAllContext ); } return(service.GetFixAllChangedSolutionAsync(fixAllContext)); }
internal override Task <ImmutableArray <CodeActionOperation> > ComputeOperationsAsync( IProgressTracker progressTracker, CancellationToken cancellationToken ) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogState( FixAllState, IsInternalCodeFixProvider(FixAllState.CodeFixProvider) ); var service = FixAllState.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); var fixAllContext = new FixAllContext(FixAllState, progressTracker, cancellationToken); if (progressTracker != null) { progressTracker.Description = FixAllContextHelper.GetDefaultFixAllTitle( fixAllContext ); } return(service.GetFixAllOperationsAsync(fixAllContext, _showPreviewChangesDialog)); }
protected async override Task <Solution> GetChangedSolutionAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogState(_fixAllState, IsInternalCodeFixProvider(_fixAllState.CodeFixProvider)); var service = _fixAllState.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); // Use the new cancellation token instead of the stale one present inside _fixAllContext. return(await service.GetFixAllChangedSolutionAsync( _fixAllState.CreateFixAllContext(cancellationToken)).ConfigureAwait(false)); }
protected override async Task <IEnumerable <CodeActionOperation> > ComputeOperationsAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogState(_fixAllState, IsInternalCodeFixProvider(_fixAllState.CodeFixProvider)); var service = _fixAllState.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); // Use the new cancellation token instead of the stale one present inside _fixAllContext. return(await service.GetFixAllOperationsAsync( _fixAllState.CreateFixAllContext(cancellationToken), _showPreviewChangesDialog).ConfigureAwait(false)); }
internal override Task <ImmutableArray <CodeActionOperation> > ComputeOperationsAsync( IProgressTracker progressTracker, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); FixAllLogger.LogState(FixAllState, IsInternalCodeFixProvider(FixAllState.CodeFixProvider)); var service = FixAllState.Project.Solution.Workspace.Services.GetService <IFixAllGetFixesService>(); // Use the new cancellation token instead of the stale one present inside _fixAllContext. return(service.GetFixAllOperationsAsync( new FixAllContext(FixAllState, progressTracker, cancellationToken), _showPreviewChangesDialog)); }