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
document
DocumentThe document to fix.
textSpan
TextSpanText span within the document.
diagnostic
DiagnosticDiagnostics to fix. All the diagnostics must have the same span.
allDocuments
boolIndicates whether all documents should be processed.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<IEnumerable<CodeFixCollection>>
List of
CodeFixCollection
describes available fixes.