SyntaxExtensions.Find Method
Containing Type: SyntaxExtensions
Assembly: Roslynator.CSharp.dll
Overloads
Method | Summary |
---|---|
Find(SyntaxTokenList, SyntaxKind) | Searches for a token of the specified kind and returns the first occurrence within the entire SyntaxTokenList. |
Find(SyntaxTriviaList, SyntaxKind) | Searches for a trivia of the specified kind and returns the first occurrence within the entire SyntaxList<TNode>. |
Find<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind) | Searches for a node of the specified kind and returns the first occurrence within the entire SeparatedSyntaxList<TNode>. |
Find<TNode>(SyntaxList<TNode>, SyntaxKind) | Searches for a node of the specified kind and returns the first occurrence within the entire SyntaxList<TNode>. |
Find(SyntaxTokenList, SyntaxKind)
Searches for a token of the specified kind and returns the first occurrence within the entire SyntaxTokenList.
public static Microsoft.CodeAnalysis.SyntaxToken Find(this Microsoft.CodeAnalysis.SyntaxTokenList tokenList, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind)
Parameters
tokenList SyntaxTokenList
kind SyntaxKind
Returns
Find(SyntaxTriviaList, SyntaxKind)
Searches for a trivia of the specified kind and returns the first occurrence within the entire SyntaxList<TNode>.
public static Microsoft.CodeAnalysis.SyntaxTrivia Find(this Microsoft.CodeAnalysis.SyntaxTriviaList triviaList, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind)
Parameters
triviaList SyntaxTriviaList
kind SyntaxKind
Returns
Find<TNode>(SeparatedSyntaxList<TNode>, SyntaxKind)
Searches for a node of the specified kind and returns the first occurrence within the entire SeparatedSyntaxList<TNode>.
public static TNode? Find<TNode>(this Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> list, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind) where TNode : Microsoft.CodeAnalysis.SyntaxNode
Type Parameters
TNode
Parameters
list SeparatedSyntaxList<TNode>
kind SyntaxKind
Returns
TNode
Find<TNode>(SyntaxList<TNode>, SyntaxKind)
Searches for a node of the specified kind and returns the first occurrence within the entire SyntaxList<TNode>.
public static TNode? Find<TNode>(this Microsoft.CodeAnalysis.SyntaxList<TNode> list, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind) where TNode : Microsoft.CodeAnalysis.SyntaxNode
Type Parameters
TNode
Parameters
list SyntaxList<TNode>
kind SyntaxKind
Returns
TNode