4 instantiations of CodeAnalysisProgress
Microsoft.CodeAnalysis.Workspaces (4)
Progress\CodeAnalysisProgress.cs (4)
36
=>
new
() { DescriptionValue = description ?? throw new ArgumentNullException(nameof(description)) };
50
=>
new
()
68
=>
new
()
85
=>
new
() { ClearValue = true };
245 references to CodeAnalysisProgress
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
95
document.Project.Solution,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (11)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
43
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
68
IProgress<
CodeAnalysisProgress
> progressTracker,
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
153
protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Progress\CodeAnalysisProgressExtensions.cs (8)
12
public static void AddItems(this IProgress<
CodeAnalysisProgress
> progress, int count)
13
=> progress.Report(
CodeAnalysisProgress
.AddIncompleteItems(count));
15
public static void ItemCompleted(this IProgress<
CodeAnalysisProgress
> progress)
16
=> progress.Report(
CodeAnalysisProgress
.AddCompleteItems(count: 1));
20
/// cref="
CodeAnalysisProgress
.AddCompleteItems"/> on <paramref name="progress"/> once disposed. This is useful to
23
public static ItemCompletedDisposer ItemCompletedScope(this IProgress<
CodeAnalysisProgress
> progress, string? description = null)
26
progress.Report(
CodeAnalysisProgress
.Description(description));
31
public readonly struct ItemCompletedDisposer(IProgress<
CodeAnalysisProgress
> progress) : IDisposable
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (13)
CodeActions\AddUsing\AddUsingNuGetTests.cs (7)
60
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
97
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
132
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
167
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
278
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", /*versionOpt*/ null, It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
316
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", "1.0", It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
353
installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", "1.0", It.IsAny<bool>(), It.IsAny<IProgress<
CodeAnalysisProgress
>>(), It.IsAny<CancellationToken>()))
CodeActions\ApplyChangesOperationTests.cs (2)
52
protected override Task<Solution?> GetChangedSolutionAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
260
var result = await operation.TryApplyAsync(workspace, originalSolution,
CodeAnalysisProgress
.None, CancellationToken.None);
CodeActions\Preview\ErrorCases\ExceptionInCodeAction.cs (1)
51
protected override Task<Solution> GetChangedSolutionAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
CodeActions\PreviewTests.cs (1)
68
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
Formatting\CodeCleanupTests.cs (2)
816
document, enabledDiagnostics,
CodeAnalysisProgress
.None, CancellationToken.None);
918
document, enabledDiagnostics,
CodeAnalysisProgress
.None, CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Features (8)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (3)
266
Func<CodeActionPurpose, IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution)
272
private readonly Func<CodeActionPurpose, IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution;
276
var changedSolution = await _createChangedSolution(CodeActionPurpose.Preview,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (4)
40
CodeActionPurpose purpose, IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
56
private sealed class FixAllCodeAction(Func<CodeActionPurpose, IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution)
62
private readonly Func<CodeActionPurpose, IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution;
67
CodeActionPurpose.Preview,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
Copilot\CSharpCopilotCodeFixProvider.DocumentChangeCodeAction.cs (1)
23
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument,
Microsoft.CodeAnalysis.EditorFeatures (12)
CodeActions\CodeActionEditHandlerService.cs (2)
98
IProgress<
CodeAnalysisProgress
> progressTracker,
264
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeActions\ICodeActionEditHandlerService.cs (1)
26
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeActions\IUIThreadOperationContextExtensions.cs (5)
14
public static IProgress<
CodeAnalysisProgress
> GetCodeAnalysisProgress(this IUIThreadOperationContext context)
17
public static IProgress<
CodeAnalysisProgress
> GetCodeAnalysisProgress(this IUIThreadOperationScope? scope)
18
=> scope is null ?
CodeAnalysisProgress
.None : new UIThreadOperationScopeProgress(scope);
20
private sealed class UIThreadOperationScopeProgress(IUIThreadOperationScope scope) : IProgress<
CodeAnalysisProgress
>
25
public void Report(
CodeAnalysisProgress
value)
ExternalAccess\UnitTestGenerator\Api\UnitTestGeneratorAddMissingImportsFeatureServiceAccessor.cs (2)
29
return await service.AddMissingImportsAsync(document, textSpan,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
49
return await service.AddMissingImportsAsync(document, unwrappedResult,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (2)
59
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
116
Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
ExtractInterface\ExtractInterfaceTestState.cs (1)
117
this.OriginalSolution, changedOptions,
CodeAnalysisProgress
.None, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeFixes\CodeFixServiceTests.cs (1)
891
var solution = await codeAction.GetChangedSolutionInternalAsync(txtDocument.Project.Solution,
CodeAnalysisProgress
.None);
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
180
var solution = await codeAction.GetChangedSolutionInternalAsync(project.Solution,
CodeAnalysisProgress
.None);
219
var solution = await codeAction.GetChangedSolutionInternalAsync(project.Solution,
CodeAnalysisProgress
.None);
RenameTracking\RenameTrackingTestState.cs (1)
200
await operations[0].TryApplyAsync(this.Workspace, this.Workspace.CurrentSolution,
CodeAnalysisProgress
.None, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (14)
Suggestions\FixAll\FixMultipleOccurrencesService.cs (3)
34
IProgress<
CodeAnalysisProgress
> progress,
52
IProgress<
CodeAnalysisProgress
> progress,
67
IProgress<
CodeAnalysisProgress
> progress,
Suggestions\PreviewChanges\PreviewChangesCodeAction.cs (1)
34
Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
Suggestions\RefineUsingCopilot\RefineUsingCopilotCodeAction.cs (2)
41
protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
94
internal override async Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
Suggestions\SuggestedActions\AbstractFixAllSuggestedAction.cs (1)
57
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
Suggestions\SuggestedActions\SuggestedAction.cs (6)
78
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
86
CodeActionWithOptions actionWithOptions, object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
135
protected virtual async Task InnerInvokeAsync(IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
147
private async Task InvokeWorkerAsync(IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
169
progressTracker.Report(
CodeAnalysisProgress
.Clear());
170
progressTracker.Report(
CodeAnalysisProgress
.Description(EditorFeaturesResources.Applying_changes));
Suggestions\SuggestedActionWithNestedActions.cs (1)
60
protected override Task InnerInvokeAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (6)
Rename\InlineRenameTests.vb (1)
1301
CodeAnalysisProgress
.None,
SyncNamespaces\SyncNamespacesServiceTests.vb (5)
44
Dim newSolution = Await syncService.SyncNamespacesAsync(ImmutableArray.Create(project),
CodeAnalysisProgress
.None, CancellationToken.None)
80
Dim newSolution = Await syncService.SyncNamespacesAsync(projects,
CodeAnalysisProgress
.None, CancellationToken.None)
137
Dim newSolution = Await syncService.SyncNamespacesAsync(projects,
CodeAnalysisProgress
.None, CancellationToken.None)
191
Dim newSolution = Await syncService.SyncNamespacesAsync(projects,
CodeAnalysisProgress
.None, CancellationToken.None)
256
Dim newSolution = Await syncService.SyncNamespacesAsync(projects,
CodeAnalysisProgress
.None, CancellationToken.None)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
CodeActions\OmniSharpCodeFixContextFactory.cs (1)
52
CodeAnalysisProgress
.None, cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Cohost\Handlers\CodeActions.cs (1)
62
var operations = await codeActionToResolve.GetOperationsAsync(solution,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (67)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
48
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (1)
186
priorDocument.Project.Solution,
CodeAnalysisProgress
.None, postProcessChanges: true, cancellationToken).ConfigureAwait(false);
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (2)
35
protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
81
Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (1)
110
Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
AddImport\CodeActions\InstallWithPackageManagerCodeAction.cs (1)
28
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (1)
72
Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (1)
39
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
AddMissingReference\AddMissingReferenceCodeAction.cs (1)
74
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
AddPackage\InstallPackageDirectlyCodeAction.cs (1)
35
protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
AddPackage\InstallPackageDirectlyCodeActionOperation.cs (1)
68
Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
AddPackage\InstallWithPackageManagerCodeAction.cs (1)
25
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
ChangeSignature\ChangeSignatureCodeAction.cs (1)
31
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
ChangeSignature\ChangeSignatureCodeActionOperation.cs (2)
31
Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
36
private bool ApplyWorker(Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\AbstractFixAllCodeFixCodeAction.cs (1)
27
protected sealed override IFixAllContext CreateFixAllContext(IFixAllState fixAllState, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
29
IProgress<
CodeAnalysisProgress
> progressTracker,
44
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (5)
52
progressTracker.Report(
CodeAnalysisProgress
.Description(fixAllContext.GetDefaultFixAllTitle()));
209
FixAllState fixAllState, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
228
IProgress<
CodeAnalysisProgress
> progressTracker,
251
IProgress<
CodeAnalysisProgress
> progressTracker,
347
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
32
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
57
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (1)
108
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (1)
61
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (5)
40
protected abstract IFixAllContext CreateFixAllContext(IFixAllState fixAllState, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken);
56
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
64
progressTracker.Report(
CodeAnalysisProgress
.Description(fixAllContext.GetDefaultFixAllTitle()));
70
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
78
progressTracker.Report(
CodeAnalysisProgress
.Description(fixAllContext.GetDefaultFixAllTitle()));
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (1)
54
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (4)
32
public async Task<Document> AddMissingImportsAsync(Document document, TextSpan textSpan, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
43
IProgress<
CodeAnalysisProgress
> progressTracker,
92
IProgress<
CodeAnalysisProgress
> progressTracker,
207
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeRefactorings\AddMissingImports\IAddMissingImportsFeatureService.cs (3)
21
Task<Document> AddMissingImportsAsync(Document document, TextSpan textSpan, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken);
29
/// Performs the same action as <see cref="AddMissingImportsAsync(Document, TextSpan, IProgress{
CodeAnalysisProgress
}, CancellationToken)"/> but with a predetermined analysis of the input
32
Task<Document> AddMissingImportsAsync(Document document, AddMissingImportsAnalysisResult analysisResult, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken);
CodeRefactorings\FixAllOccurences\FixAllCodeRefactoringCodeAction.cs (1)
16
protected override IFixAllContext CreateFixAllContext(IFixAllState fixAllState, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeCodeAction.cs (1)
52
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
37
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
63
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
35
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (3)
102
priorDocument, action,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
109
Document priorDocument, CodeAction codeAction, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
129
IProgress<
CodeAnalysisProgress
> progressTracker,
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (1)
54
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
52
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
51
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
GenerateType\AbstractGenerateTypeService.CodeAction.cs (2)
66
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
173
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
44
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
MoveToNamespace\MoveToNamespaceCodeAction.cs (1)
43
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
39
object options, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
43
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
68
IProgress<
CodeAnalysisProgress
> progressTracker,
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
153
protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (2)
127
private ProjectOptionsChangeAction(string title, Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution)
132
public static ProjectOptionsChangeAction Create(string title, Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution)
SyncNamespaces\AbstractSyncNamespacesService.cs (2)
34
IProgress<
CodeAnalysisProgress
> progressTracker,
99
IProgress<
CodeAnalysisProgress
> progressTracker,
SyncNamespaces\ISyncNamespacesService.cs (1)
21
ImmutableArray<Project> projects, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken);
Wrapping\WrapItemsAction.cs (3)
22
internal sealed class WrapItemsAction(string title, string parentTitle, Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument)
43
return await base.ComputeOperationsAsync(
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
46
protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol (17)
Features\CodeCleanup\AbstractCodeCleanupService.cs (9)
41
IProgress<
CodeAnalysisProgress
> progressTracker,
83
progressTracker.Report(
CodeAnalysisProgress
.Description(this.OrganizeImportsDescription));
93
progressTracker.Report(
CodeAnalysisProgress
.Description(FeaturesResources.Formatting_document));
138
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
145
progressTracker.Report(
CodeAnalysisProgress
.Description(diagnosticSet.Description));
157
Document document, ImmutableArray<string> diagnosticIds, bool isAnyDiagnosticIdExplicitlyEnabled, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
176
Document document, string diagnosticId, DiagnosticSeverity minimumSeverity, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
222
IProgress<
CodeAnalysisProgress
> progressTracker,
229
progressTracker.Report(
CodeAnalysisProgress
.Description(string.Format(FeaturesResources.Fixing_0, title ?? diagnosticId)));
Features\CodeCleanup\ICodeCleanupService.cs (1)
15
Task<Document> CleanupAsync(Document document, EnabledDiagnosticOptions enabledDiagnostics, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken);
Features\CodeFixes\CodeFixService.cs (2)
324
public Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>(TDocument document, string diagnosticId, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken) where TDocument : TextDocument
331
IProgress<
CodeAnalysisProgress
> progressTracker,
Features\CodeFixes\ICodeFixService.cs (2)
28
Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>(TDocument document, string diagnosticId, DiagnosticSeverity severity, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
44
public static Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>(this ICodeFixService service, TDocument document, string diagnosticId, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken) where TDocument : TextDocument
Handler\CodeActions\CodeActionFixAllResolveHandler.cs (1)
61
var operations = await fixAllCodeAction.GetOperationsAsync(document.Project.Solution,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionResolveHandler.cs (1)
91
solution,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
Handler\CodeActions\FixAllCodeAction.cs (1)
24
protected override IFixAllContext CreateFixAllContext(IFixAllState fixAllState, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces (74)
CodeActions\CodeAction.cs (28)
230
=> GetOperationsAsync(originalSolution: null!,
CodeAnalysisProgress
.None, cancellationToken);
236
Solution originalSolution, IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
242
Solution originalSolution, IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
281
var changedSolution = await GetChangedSolutionAsync(
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
296
IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
318
/// than the operations produced by <see cref="ComputeOperationsAsync(IProgress{
CodeAnalysisProgress
}, CancellationToken)"/>.
321
=> await ComputeOperationsAsync(
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
326
/// cref="GetChangedSolutionAsync(IProgress{
CodeAnalysisProgress
}, CancellationToken)"/> to report progress
341
protected virtual async Task<Solution?> GetChangedSolutionAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
358
internal async Task<Solution> GetRequiredChangedSolutionAsync(IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
367
/// cref="GetChangedDocumentAsync(IProgress{
CodeAnalysisProgress
}, CancellationToken)"/> to report progress
393
protected virtual Task<Document> GetChangedDocumentAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
400
Solution originalSolution, IProgress<
CodeAnalysisProgress
> progress, bool postProcessChanges = true, CancellationToken cancellationToken = default)
466
return await CleanSyntaxAndSemanticsAsync(originalSolution, changedSolution,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
502
internal static CodeAction Create(string title, Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey)
513
public static CodeAction Create(string title, Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default)
548
public static CodeAction Create(string title, Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default)
660
private readonly Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> _createChangedDocument;
664
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument,
675
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument,
684
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Document>> createChangedDocument,
689
protected sealed override Task<Document> GetChangedDocumentAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
695
private readonly Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> _createChangedSolution;
699
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution,
710
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution,
719
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> createChangedSolution,
724
protected sealed override Task<Solution?> GetChangedSolutionAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
745
protected sealed override Task<Solution?> GetChangedSolutionAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
CodeActions\CodeAction_Cleanup.cs (3)
75
IProgress<
CodeAnalysisProgress
> progress,
114
CodeAnalysisProgress
.None,
123
IProgress<
CodeAnalysisProgress
> progress,
CodeActions\CodeActionWithOptions.cs (5)
17
/// IProgress{
CodeAnalysisProgress
}, CancellationToken)"/> to actually compute the operations for this action.
35
=> GetOperationsAsync(originalSolution: null!, options,
CodeAnalysisProgress
.None, cancellationToken);
38
Solution originalSolution, object? options, IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
54
Solution originalSolution, IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
74
protected virtual Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(object options, IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
CodeActions\Operations\ApplyChangesOperation.cs (3)
41
=> workspace.TryApplyChanges(ChangedSolution,
CodeAnalysisProgress
.None);
43
internal sealed override Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
50
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeActions\Operations\CodeActionOperation.cs (1)
34
internal virtual Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (4)
43
progressTracker.Report(
CodeAnalysisProgress
.Description(originalFixAllContext.GetDefaultFixAllTitle()));
77
FixAllContext fixAllContext, IProgress<
CodeAnalysisProgress
> progressTracker, Dictionary<DocumentId, TextChangeMerger> docIdToTextMerger)
86
private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> DetermineDiagnosticsAsync(FixAllContext fixAllContext, IProgress<
CodeAnalysisProgress
> progressTracker)
108
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeFixes\FixAllOccurrences\FixAllContext.cs (4)
72
public IProgress<
CodeAnalysisProgress
> Progress { get; }
168
CodeAnalysisProgress
.None, cancellationToken)
203
CodeAnalysisProgress
.None, cancellationToken)
214
IProgress<
CodeAnalysisProgress
> progressTracker,
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (4)
26
IProgress<
CodeAnalysisProgress
> progressTracker,
33
progressTracker.Report(
CodeAnalysisProgress
.Description(progressTrackerDescription));
44
progressTracker.Report(
CodeAnalysisProgress
.Clear());
45
progressTracker.Report(
CodeAnalysisProgress
.Description(WorkspacesResources.Running_code_cleanup_on_fixed_documents));
CodeFixesAndRefactorings\IFixAllContext.cs (1)
25
IProgress<
CodeAnalysisProgress
> Progress { get; }
CodeRefactorings\FixAllOccurences\FixAllContext.cs (2)
53
public IProgress<
CodeAnalysisProgress
> Progress { get; }
84
IProgress<
CodeAnalysisProgress
> progressTracker,
Packaging\IPackageInstallerService.cs (1)
25
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken);
Progress\CodeAnalysisProgress.cs (6)
21
internal static readonly IProgress<
CodeAnalysisProgress
> None = NullProgress<
CodeAnalysisProgress
>.Instance;
35
public static
CodeAnalysisProgress
Description(string description)
49
public static
CodeAnalysisProgress
AddIncompleteItems(int count, string? description = null)
67
public static
CodeAnalysisProgress
AddCompleteItems(int count, string? description = null)
84
internal static
CodeAnalysisProgress
Clear()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Progress\CodeAnalysisProgressExtensions.cs (8)
12
public static void AddItems(this IProgress<
CodeAnalysisProgress
> progress, int count)
13
=> progress.Report(
CodeAnalysisProgress
.AddIncompleteItems(count));
15
public static void ItemCompleted(this IProgress<
CodeAnalysisProgress
> progress)
16
=> progress.Report(
CodeAnalysisProgress
.AddCompleteItems(count: 1));
20
/// cref="
CodeAnalysisProgress
.AddCompleteItems"/> on <paramref name="progress"/> once disposed. This is useful to
23
public static ItemCompletedDisposer ItemCompletedScope(this IProgress<
CodeAnalysisProgress
> progress, string? description = null)
26
progress.Report(
CodeAnalysisProgress
.Description(description));
31
public readonly struct ItemCompletedDisposer(IProgress<
CodeAnalysisProgress
> progress) : IDisposable
Workspace\Workspace.cs (4)
61
/// when they are applied to workspace via <see cref="TryApplyChanges(Solution, IProgress{
CodeAnalysisProgress
})"/>.
1526
=> TryApplyChanges(newSolution,
CodeAnalysisProgress
.None);
1528
internal virtual bool TryApplyChanges(Solution newSolution, IProgress<
CodeAnalysisProgress
> progressTracker)
1577
progressTracker.Report(
CodeAnalysisProgress
.Description(string.Format(WorkspacesResources.Applying_changes_to_0, projectChanges.NewProject.Name)));
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
306
return TryApplyChanges(newSolution,
CodeAnalysisProgress
.None);
309
internal override bool TryApplyChanges(Solution newSolution, IProgress<
CodeAnalysisProgress
> progressTracker)
Microsoft.VisualStudio.LanguageServices (13)
CodeCleanup\AbstractCodeCleanUpFixer.cs (5)
158
async Task<Solution> ApplyFixAsync(IProgress<
CodeAnalysisProgress
> progress, CancellationToken cancellationToken)
170
Func<IProgress<
CodeAnalysisProgress
>, CancellationToken, Task<Solution>> applyFixAsync,
197
IProgress<
CodeAnalysisProgress
> progressTracker,
224
var fixedDocument = await FixDocumentAsync(document, enabledFixIds,
CodeAnalysisProgress
.None, cancellationToken).ConfigureAwait(false);
240
IProgress<
CodeAnalysisProgress
> progressTracker,
Packaging\PackageInstallerServiceFactory.cs (5)
264
IProgress<
CodeAnalysisProgress
> progressTracker,
300
IProgress<
CodeAnalysisProgress
> progressTracker,
306
progressTracker.Report(
CodeAnalysisProgress
.Description(description));
373
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
378
progressTracker.Report(
CodeAnalysisProgress
.Description(description));
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (2)
21
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
42
IProgress<
CodeAnalysisProgress
> progressTracker, CancellationToken cancellationToken)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
314
IProgress<
CodeAnalysisProgress
> progressTracker)