86 references to ListPattern
Microsoft.CodeAnalysis.CSharp (1)
Binder\DecisionDagBuilder.cs (1)
2218if (e.Syntax.IsKind(SyntaxKind.ListPattern))
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
267if (node.Parent != null && node.Kind() is SyntaxKind.ListPattern or SyntaxKind.CollectionExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
208if (currentKind == SyntaxKind.OpenBracketToken && currentToken.Parent.Kind() is SyntaxKind.ListPattern or SyntaxKind.CollectionExpression) 606=> token.Parent is (kind: SyntaxKind.ArrayRankSpecifier or SyntaxKind.BracketedArgumentList or SyntaxKind.BracketedParameterList or SyntaxKind.ImplicitArrayCreationExpression or SyntaxKind.ListPattern or SyntaxKind.CollectionExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
128public int? ListPattern => (int)SyntaxKind.ListPattern;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1405if (leftToken.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.ListPattern)) 2699token.Parent.IsKind(SyntaxKind.ListPattern))
Microsoft.CodeAnalysis.CSharp.Features (2)
BraceCompletion\BracketBraceCompletionService.cs (1)
49if (currentToken.IsKind(SyntaxKind.OpenBracketToken) && currentToken.Parent.IsKind(SyntaxKind.ListPattern))
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
318if (designation is not { Parent: PatternSyntax(not SyntaxKind.ListPattern) containingPattern })
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (71)
Parsing\CollectionExpressionParsingTests.cs (1)
1151N(SyntaxKind.ListPattern);
Parsing\NullableParsingTests.cs (1)
2350N(SyntaxKind.ListPattern);
Parsing\PatternParsingTests_ListPatterns.cs (31)
44N(SyntaxKind.ListPattern); 47N(SyntaxKind.ListPattern); 77N(SyntaxKind.ListPattern); 80N(SyntaxKind.ListPattern); 115N(SyntaxKind.ListPattern); 162N(SyntaxKind.ListPattern); 245N(SyntaxKind.ListPattern); 282N(SyntaxKind.ListPattern); 322N(SyntaxKind.ListPattern); 361N(SyntaxKind.ListPattern); 460N(SyntaxKind.ListPattern); 486N(SyntaxKind.ListPattern); 566N(SyntaxKind.ListPattern); 572N(SyntaxKind.ListPattern); 596N(SyntaxKind.ListPattern); 632N(SyntaxKind.ListPattern); 675N(SyntaxKind.ListPattern); 780N(SyntaxKind.ListPattern); 848N(SyntaxKind.ListPattern); 851N(SyntaxKind.ListPattern); 957N(SyntaxKind.ListPattern); 1081N(SyntaxKind.ListPattern); 1114N(SyntaxKind.ListPattern); 1150N(SyntaxKind.ListPattern); 1190N(SyntaxKind.ListPattern); 1241N(SyntaxKind.ListPattern); 1292N(SyntaxKind.ListPattern); 1355N(SyntaxKind.ListPattern); 1418N(SyntaxKind.ListPattern); 1485N(SyntaxKind.ListPattern); 1552N(SyntaxKind.ListPattern);
Parsing\PatternParsingTests2.cs (2)
407N(SyntaxKind.ListPattern); 793N(SyntaxKind.ListPattern);
Parsing\StatementParsingTests.cs (12)
5204N(SyntaxKind.ListPattern); 5214N(SyntaxKind.ListPattern); 5271N(SyntaxKind.ListPattern); 5274N(SyntaxKind.ListPattern); 5286N(SyntaxKind.ListPattern); 5289N(SyntaxKind.ListPattern); 5354N(SyntaxKind.ListPattern); 5357N(SyntaxKind.ListPattern); 5360N(SyntaxKind.ListPattern); 5374N(SyntaxKind.ListPattern); 5377N(SyntaxKind.ListPattern); 5380N(SyntaxKind.ListPattern);
Parsing\SwitchExpressionParsingTests.cs (24)
3704N(SyntaxKind.ListPattern); 3718N(SyntaxKind.ListPattern); 3767N(SyntaxKind.ListPattern); 3781N(SyntaxKind.ListPattern); 3830N(SyntaxKind.ListPattern); 3833N(SyntaxKind.ListPattern); 3849N(SyntaxKind.ListPattern); 3852N(SyntaxKind.ListPattern); 3909N(SyntaxKind.ListPattern); 3912N(SyntaxKind.ListPattern); 3928N(SyntaxKind.ListPattern); 3931N(SyntaxKind.ListPattern); 3988N(SyntaxKind.ListPattern); 3991N(SyntaxKind.ListPattern); 3994N(SyntaxKind.ListPattern); 4012N(SyntaxKind.ListPattern); 4015N(SyntaxKind.ListPattern); 4018N(SyntaxKind.ListPattern); 4083N(SyntaxKind.ListPattern); 4086N(SyntaxKind.ListPattern); 4089N(SyntaxKind.ListPattern); 4107N(SyntaxKind.ListPattern); 4110N(SyntaxKind.ListPattern); 4113N(SyntaxKind.ListPattern);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
267if (node.Parent != null && node.Kind() is SyntaxKind.ListPattern or SyntaxKind.CollectionExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
208if (currentKind == SyntaxKind.OpenBracketToken && currentToken.Parent.Kind() is SyntaxKind.ListPattern or SyntaxKind.CollectionExpression) 606=> token.Parent is (kind: SyntaxKind.ArrayRankSpecifier or SyntaxKind.BracketedArgumentList or SyntaxKind.BracketedParameterList or SyntaxKind.ImplicitArrayCreationExpression or SyntaxKind.ListPattern or SyntaxKind.CollectionExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
128public int? ListPattern => (int)SyntaxKind.ListPattern;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1405if (leftToken.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.ListPattern)) 2699token.Parent.IsKind(SyntaxKind.ListPattern))