Udostępnij za pośrednictwem


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

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

public Microsoft.CodeAnalysis.SyntaxTrivia FindTrivia (int position, bool findInsideTrivia = false);
member this.FindTrivia : int * bool -> Microsoft.CodeAnalysis.SyntaxTrivia
Public Function FindTrivia (position As Integer, Optional findInsideTrivia As Boolean = false) As SyntaxTrivia

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

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

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

public:
 Microsoft::CodeAnalysis::SyntaxTrivia FindTrivia(int position, Func<Microsoft::CodeAnalysis::SyntaxTrivia, bool> ^ stepInto);
public Microsoft.CodeAnalysis.SyntaxTrivia FindTrivia (int position, Func<Microsoft.CodeAnalysis.SyntaxTrivia,bool> stepInto);
public Microsoft.CodeAnalysis.SyntaxTrivia FindTrivia (int position, Func<Microsoft.CodeAnalysis.SyntaxTrivia,bool>? stepInto);
member this.FindTrivia : int * Func<Microsoft.CodeAnalysis.SyntaxTrivia, bool> -> Microsoft.CodeAnalysis.SyntaxTrivia
Public Function FindTrivia (position As Integer, stepInto As Func(Of SyntaxTrivia, Boolean)) As SyntaxTrivia

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