SyntaxExtensions.IndexOf Method
Containing Type: SyntaxExtensions
Assembly: Roslynator.Core.dll
Overloads
Method | Summary |
---|---|
IndexOf(SyntaxTokenList, Func<SyntaxToken, Boolean>) | Searches for a token that matches the predicate and returns the zero-based index of the first occurrence within the entire SyntaxTokenList. |
IndexOf(SyntaxTriviaList, Func<SyntaxTrivia, Boolean>) | Searches for a trivia that matches the predicate and returns the zero-based index of the first occurrence within the entire SyntaxTriviaList. |
IndexOf(SyntaxTokenList, Func<SyntaxToken, Boolean>)
Searches for a token that matches the predicate and returns the zero-based index of the first occurrence within the entire SyntaxTokenList.
public static int IndexOf(this Microsoft.CodeAnalysis.SyntaxTokenList tokens, Func<Microsoft.CodeAnalysis.SyntaxToken, bool> predicate)
Parameters
tokens SyntaxTokenList
predicate Func<SyntaxToken, Boolean>
Returns
IndexOf(SyntaxTriviaList, Func<SyntaxTrivia, Boolean>)
Searches for a trivia that matches the predicate and returns the zero-based index of the first occurrence within the entire SyntaxTriviaList.
public static int IndexOf(this Microsoft.CodeAnalysis.SyntaxTriviaList triviaList, Func<Microsoft.CodeAnalysis.SyntaxTrivia, bool> predicate)
Parameters
triviaList SyntaxTriviaList
predicate Func<SyntaxTrivia, Boolean>