SyntaxNode.FindTrivia Method

Definition

Overloads

FindTrivia(Int32, Boolean)

Finds a descendant trivia of this node whose span includes the supplied position.

FindTrivia(Int32, Func<SyntaxTrivia,Boolean>)

Finds a descendant trivia of this node at the specified position, where the position is within the span of the node.

FindTrivia(Int32, Boolean)

Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs

Finds a descendant trivia of this node whose span includes the supplied position.

C#
public Microsoft.CodeAnalysis.SyntaxTrivia FindTrivia(int position, bool findInsideTrivia = false);

Parameters

position
Int32

The character position of the trivia relative to the beginning of the file.

findInsideTrivia
Boolean

True to return tokens that are part of trivia. If false finds the token whose full span (including trivia) includes the position.

Returns

Applies to

Roslyn 4.13.0 a ďalšie verzie
Produkt Verzie
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0

FindTrivia(Int32, Func<SyntaxTrivia,Boolean>)

Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs
Source:
SyntaxNode.cs

Finds a descendant trivia of this node at the specified position, where the position is within the span of the node.

C#
public Microsoft.CodeAnalysis.SyntaxTrivia FindTrivia(int position, Func<Microsoft.CodeAnalysis.SyntaxTrivia,bool> stepInto);
C#
public Microsoft.CodeAnalysis.SyntaxTrivia FindTrivia(int position, Func<Microsoft.CodeAnalysis.SyntaxTrivia,bool>? stepInto);

Parameters

position
Int32

The character position of the trivia relative to the beginning of the file.

stepInto
Func<SyntaxTrivia,Boolean>

Specifies a function that determines per trivia node, whether to descend into structured trivia of that node.

Returns

Applies to

Roslyn 4.13.0 a ďalšie verzie
Produkt Verzie
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0