CodeAction.GetChangedDocumentAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetChangedDocumentAsync(IProgress<CodeAnalysisProgress>, CancellationToken) |
Computes changes for a single document. Override this method if you want to implement a CodeAction subclass that changes a single document. Prefer overriding this method over GetChangedDocumentAsync(CancellationToken) when computation is long running and progress should be shown to the user. |
GetChangedDocumentAsync(CancellationToken) |
Computes changes for a single document. Override this method if you want to implement a CodeAction subclass that changes a single document. Override GetChangedDocumentAsync(IProgress<CodeAnalysisProgress>, CancellationToken) to report progress progress while computing the operations. |
GetChangedDocumentAsync(IProgress<CodeAnalysisProgress>, CancellationToken)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
Computes changes for a single document. Override this method if you want to implement a CodeAction subclass that changes a single document. Prefer overriding this method over GetChangedDocumentAsync(CancellationToken) when computation is long running and progress should be shown to the user.
protected virtual System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> GetChangedDocumentAsync (IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress> progress, System.Threading.CancellationToken cancellationToken);
abstract member GetChangedDocumentAsync : IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
override this.GetChangedDocumentAsync : IProgress<Microsoft.CodeAnalysis.CodeAnalysisProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Protected Overridable Function GetChangedDocumentAsync (progress As IProgress(Of CodeAnalysisProgress), cancellationToken As CancellationToken) As Task(Of Document)
Parameters
- progress
- IProgress<CodeAnalysisProgress>
- cancellationToken
- CancellationToken
Returns
Exceptions
If this code action does not support changing a single document.
Remarks
All code actions are expected to operate on solutions. This method is a helper to simplify the implementation of GetChangedSolutionAsync(CancellationToken) for code actions that only need to change one document.
Applies to
GetChangedDocumentAsync(CancellationToken)
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
- Source:
- CodeAction.cs
Computes changes for a single document. Override this method if you want to implement a CodeAction subclass that changes a single document. Override GetChangedDocumentAsync(IProgress<CodeAnalysisProgress>, CancellationToken) to report progress progress while computing the operations.
protected:
virtual System::Threading::Tasks::Task<Microsoft::CodeAnalysis::Document ^> ^ GetChangedDocumentAsync(System::Threading::CancellationToken cancellationToken);
protected virtual System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> GetChangedDocumentAsync (System.Threading.CancellationToken cancellationToken);
abstract member GetChangedDocumentAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
override this.GetChangedDocumentAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document>
Protected Overridable Function GetChangedDocumentAsync (cancellationToken As CancellationToken) As Task(Of Document)
Parameters
- cancellationToken
- CancellationToken
Returns
Exceptions
If this code action does not support changing a single document.
Remarks
All code actions are expected to operate on solutions. This method is a helper to simplify the implementation of GetChangedSolutionAsync(CancellationToken) for code actions that only need to change one document.