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
document
DocumentThe document to fix.
textSpan
TextSpanText span within the document.
diagnostic
DiagnosticA diagnostics 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.