Method GetCodeFixes
GetCodeFixes(Document, TextSpan, Diagnostic, bool, CancellationToken)
Retrieves a list of CodeFixCollection for specified text spans inside a given document.
public Task<IEnumerable<CodeFixCollection>> GetCodeFixes(Document document, TextSpan textSpan, Diagnostic diagnostic, bool allDocuments, CancellationToken cancellationToken)
Parameters
documentDocumentThe document to fix.
textSpanTextSpanText span within the document.
diagnosticDiagnosticA diagnostics to fix. All the diagnostics must have the same span.
allDocumentsboolIndicates whether all documents should be processed.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IEnumerable<CodeFixCollection>>
List of
CodeFixCollectiondescribes available fixes.