Udostępnij za pośrednictwem


SyntaxTree.GetLineMappings(CancellationToken) Method

Definition

Returns empty sequence if there are no line mapping directives in the tree. Otherwise, returns a sequence of pairs of spans: each describing a mapping of a span of the tree between two consecutive #line directives. If the first directive is not on the first line the first pair describes mapping of the span preceding the first directive. The last pair of the sequence describes mapping of the span following the last #line directive.

public abstract System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.LineMapping> GetLineMappings (System.Threading.CancellationToken cancellationToken = default);
abstract member GetLineMappings : System.Threading.CancellationToken -> seq<Microsoft.CodeAnalysis.LineMapping>
Public MustOverride Function GetLineMappings (Optional cancellationToken As CancellationToken = Nothing) As IEnumerable(Of LineMapping)

Parameters

cancellationToken
CancellationToken

Returns

Empty sequence if the tree does not contain a line mapping directive. Otherwise a non-empty sequence of LineMapping.

Applies to