Skip to main content

SyntaxExtensions.Contains Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.Core.dll

Overloads​

MethodSummary
Contains(SyntaxTokenList, SyntaxToken)Returns true if the specified token is in the SyntaxTokenList.
Contains<TNode>(SeparatedSyntaxList<TNode>, TNode)Returns true if the specified node is in the SeparatedSyntaxList<TNode>.
Contains<TNode>(SyntaxList<TNode>, TNode)Returns true if the specified node is in the SyntaxList<TNode>.

Contains(SyntaxTokenList, SyntaxToken)​

Returns true if the specified token is in the SyntaxTokenList.

public static bool Contains(this Microsoft.CodeAnalysis.SyntaxTokenList tokens, Microsoft.CodeAnalysis.SyntaxToken token)

Parameters​

tokens   SyntaxTokenList

token   SyntaxToken

Returns​

Boolean

Contains<TNode>(SeparatedSyntaxList<TNode>, TNode)​

Returns true if the specified node is in the SeparatedSyntaxList<TNode>.

public static bool Contains<TNode>(this Microsoft.CodeAnalysis.SeparatedSyntaxList<TNode> list, TNode node) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters​

TNode

Parameters​

list   SeparatedSyntaxList<TNode>

node   TNode

Returns​

Boolean

Contains<TNode>(SyntaxList<TNode>, TNode)​

Returns true if the specified node is in the SyntaxList<TNode>.

public static bool Contains<TNode>(this Microsoft.CodeAnalysis.SyntaxList<TNode> list, TNode node) where TNode : Microsoft.CodeAnalysis.SyntaxNode

Type Parameters​

TNode

Parameters​

list   SyntaxList<TNode>

node   TNode

Returns​

Boolean