Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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));
        }