45 references to ParenthesizedPattern
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer.cs (1)
22
=> SyntaxKind.
ParenthesizedPattern
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
163
if ((previousToken.Parent.Kind() is SyntaxKind.ParenthesizedExpression or SyntaxKind.
ParenthesizedPattern
&& previousKind == SyntaxKind.OpenParenToken) ||
164
(currentToken.Parent.Kind() is SyntaxKind.ParenthesizedExpression or SyntaxKind.
ParenthesizedPattern
&& currentKind == SyntaxKind.CloseParenToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
126
public int? ParenthesizedPattern => (int)SyntaxKind.
ParenthesizedPattern
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1376
if (leftToken.Parent.IsKind(SyntaxKind.
ParenthesizedPattern
))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (12)
Semantics\PatternMatchingTests3.cs (12)
4117
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4139
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4152
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4207
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4233
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4265
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4344
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4366
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4379
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4441
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4467
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
4499
Assert.Equal(SyntaxKind.
ParenthesizedPattern
, pattern.Kind());
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryParentheses\CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer.cs (1)
22
=> SyntaxKind.
ParenthesizedPattern
;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (23)
Parsing\PatternParsingTests.cs (15)
1975
N(SyntaxKind.
ParenthesizedPattern
);
1978
N(SyntaxKind.
ParenthesizedPattern
);
9732
N(SyntaxKind.
ParenthesizedPattern
);
10438
N(SyntaxKind.
ParenthesizedPattern
);
11045
N(SyntaxKind.
ParenthesizedPattern
);
11097
N(SyntaxKind.
ParenthesizedPattern
);
11209
N(SyntaxKind.
ParenthesizedPattern
);
11378
N(SyntaxKind.
ParenthesizedPattern
);
11424
N(SyntaxKind.
ParenthesizedPattern
);
11490
N(SyntaxKind.
ParenthesizedPattern
);
11516
N(SyntaxKind.
ParenthesizedPattern
);
12240
N(SyntaxKind.
ParenthesizedPattern
);
12291
N(SyntaxKind.
ParenthesizedPattern
);
12441
N(SyntaxKind.
ParenthesizedPattern
);
12492
N(SyntaxKind.
ParenthesizedPattern
);
Parsing\PatternParsingTests_ListPatterns.cs (1)
1044
N(SyntaxKind.
ParenthesizedPattern
);
Parsing\PatternParsingTests2.cs (2)
1167
N(SyntaxKind.
ParenthesizedPattern
);
1234
N(SyntaxKind.
ParenthesizedPattern
);
Parsing\RangeExpressionParsingTests.cs (2)
272
N(SyntaxKind.
ParenthesizedPattern
);
303
N(SyntaxKind.
ParenthesizedPattern
);
Parsing\StatementParsingTests.cs (1)
5763
N(SyntaxKind.
ParenthesizedPattern
);
Parsing\SwitchExpressionParsingTests.cs (2)
4716
N(SyntaxKind.
ParenthesizedPattern
);
4786
N(SyntaxKind.
ParenthesizedPattern
);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
163
if ((previousToken.Parent.Kind() is SyntaxKind.ParenthesizedExpression or SyntaxKind.
ParenthesizedPattern
&& previousKind == SyntaxKind.OpenParenToken) ||
164
(currentToken.Parent.Kind() is SyntaxKind.ParenthesizedExpression or SyntaxKind.
ParenthesizedPattern
&& currentKind == SyntaxKind.CloseParenToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
126
public int? ParenthesizedPattern => (int)SyntaxKind.
ParenthesizedPattern
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1376
if (leftToken.Parent.IsKind(SyntaxKind.
ParenthesizedPattern
))