LocationExtensions Class
internal static class LocationExtensionsNo documentation is available.
Methods
| Name | Description |
|---|---|
| GetEndLine(SyntaxNode, CancellationToken) | Gets the end line of the given node. |
| GetEndLine(SyntaxToken, CancellationToken) | Gets the end line of the given token. |
| GetEndLine(SyntaxTrivia, CancellationToken) | Gets the end line of the given trivia. |
| GetLine(SyntaxNode, CancellationToken) | Gets the line on which the given node occurs. |
| GetLine(SyntaxToken, CancellationToken) | Gets the line on which the given token occurs. |
| GetLine(SyntaxTrivia, CancellationToken) | Gets the line on which the given trivia occurs. |
| GetLineSpan(SyntaxNode, CancellationToken) | Gets the location in terms of path, line and column for a given node. |
| GetLineSpan(SyntaxNodeOrToken, CancellationToken) | Gets the location in terms of path, line and column for a given node or token. |
| GetLineSpan(SyntaxToken, CancellationToken) | Gets the location in terms of path, line and column for a given token. |
| GetLineSpan(SyntaxTrivia, CancellationToken) | Gets the location in terms of path, line and column for a given trivia. |
| SpansMultipleLines(SyntaxNode, CancellationToken) | Get a value indicating whether the given node span multiple source text lines. |
| SpansMultipleLines(SyntaxTrivia, CancellationToken) | Gets a value indicating whether the given trivia span multiple source text lines. |
GetEndLine overloads
GetEndLine(SyntaxNode, CancellationToken)
Gets the end line of the given node.
internal static int? GetEndLine(this SyntaxNode node, CancellationToken cancellationToken)Parameters
nodeSyntaxNode- The node to use.
cancellationTokenCancellationToken
Returns
int? The line on which the given node ends.
GetEndLine(SyntaxToken, CancellationToken)
Gets the end line of the given token.
internal static int? GetEndLine(this SyntaxToken token, CancellationToken cancellationToken)Parameters
tokenSyntaxToken- The token to use.
cancellationTokenCancellationToken
Returns
int? The line on which the given token ends.
GetEndLine(SyntaxTrivia, CancellationToken)
Gets the end line of the given trivia.
internal static int? GetEndLine(this SyntaxTrivia trivia, CancellationToken cancellationToken)Parameters
triviaSyntaxTrivia- The trivia to use.
cancellationTokenCancellationToken
Returns
int? The line on which the given trivia ends.
GetLine overloads
GetLine(SyntaxNode, CancellationToken)
Gets the line on which the given node occurs.
internal static int? GetLine(this SyntaxNode node, CancellationToken cancellationToken)Parameters
nodeSyntaxNode- The node to use.
cancellationTokenCancellationToken
Returns
int? The line on which the given node occurs.
GetLine(SyntaxToken, CancellationToken)
Gets the line on which the given token occurs.
internal static int? GetLine(this SyntaxToken token, CancellationToken cancellationToken)Parameters
tokenSyntaxToken- The token to use.
cancellationTokenCancellationToken
Returns
int? The line on which the given token occurs.
GetLine(SyntaxTrivia, CancellationToken)
Gets the line on which the given trivia occurs.
internal static int? GetLine(this SyntaxTrivia trivia, CancellationToken cancellationToken)Parameters
triviaSyntaxTrivia- The trivia to use.
cancellationTokenCancellationToken
Returns
int? The line on which the given trivia occurs.
GetLineSpan overloads
GetLineSpan(SyntaxNode, CancellationToken)
Gets the location in terms of path, line and column for a given node.
internal static FileLinePositionSpan? GetLineSpan(this SyntaxNode node, CancellationToken cancellationToken)Parameters
nodeSyntaxNode- The node to use.
cancellationTokenCancellationToken
Returns
FileLinePositionSpan? The location in terms of path, line and column for a given node.
GetLineSpan(SyntaxNodeOrToken, CancellationToken)
Gets the location in terms of path, line and column for a given node or token.
internal static FileLinePositionSpan? GetLineSpan(this SyntaxNodeOrToken nodeOrToken, CancellationToken cancellationToken)Parameters
nodeOrTokenSyntaxNodeOrToken- The trivia to use.
cancellationTokenCancellationToken
Returns
FileLinePositionSpan? The location in terms of path, line and column for a given node or token.
GetLineSpan(SyntaxToken, CancellationToken)
Gets the location in terms of path, line and column for a given token.
internal static FileLinePositionSpan? GetLineSpan(this SyntaxToken token, CancellationToken cancellationToken)Parameters
tokenSyntaxToken- The token to use.
cancellationTokenCancellationToken
Returns
FileLinePositionSpan? The location in terms of path, line and column for a given token.
GetLineSpan(SyntaxTrivia, CancellationToken)
Gets the location in terms of path, line and column for a given trivia.
internal static FileLinePositionSpan? GetLineSpan(this SyntaxTrivia trivia, CancellationToken cancellationToken)Parameters
triviaSyntaxTrivia- The trivia to use.
cancellationTokenCancellationToken
Returns
FileLinePositionSpan? The location in terms of path, line and column for a given trivia.
SpansMultipleLines overloads
SpansMultipleLines(SyntaxNode, CancellationToken)
Get a value indicating whether the given node span multiple source text lines.
internal static bool SpansMultipleLines(this SyntaxNode node, CancellationToken cancellationToken)Parameters
nodeSyntaxNode- The node to check.
cancellationTokenCancellationToken
Returns
bool True, if the node spans multiple source text lines.
SpansMultipleLines(SyntaxTrivia, CancellationToken)
Gets a value indicating whether the given trivia span multiple source text lines.
internal static bool SpansMultipleLines(this SyntaxTrivia trivia, CancellationToken cancellationToken)Parameters
triviaSyntaxTrivia- The trivia to check.
cancellationTokenCancellationToken
Returns
bool true if the trivia spans multiple source text lines; otherwise, false.