Method HasCodeFixes
HasCodeFixes(Document, TextSpan, Diagnostic, bool, CancellationToken)
When implemented by a class, indicates whether the document has any code fixes for the specified text span.
Task<bool> HasCodeFixes(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.