Method GetCodeFixes
GetCodeFixes(Document, TextSpan, Diagnostic, bool, CancellationToken)
When implemented by a class, retrieves a list of CodeFixCollection for specified text spans inside a given document.
Task<IEnumerable<CodeFixCollection>> GetCodeFixes(Document document, TextSpan textSpan, Diagnostic diagnostic, bool allDocuments, CancellationToken cancellationToken)
Parameters
documentDocumentThe document to fix.
textSpanTextSpanText span within the document.
diagnosticDiagnosticDiagnostics 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.