Table of Contents

Method GetCodeFixes

Namespace
Alternet.Syntax.Parsers.Roslyn
Assembly
Alternet.Syntax.Parsers.Roslyn.v9.dll

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 Document

The document to fix.

textSpan TextSpan

Text span within the document.

diagnostic Diagnostic

A diagnostics to fix. All the diagnostics must have the same span.

allDocuments bool

Indicates whether all documents should be processed.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IEnumerable<CodeFixCollection>>

List of CodeFixCollection describes available fixes.