46 references to AndPattern
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Patterns.cs (1)
1744permitDesignations = permitDesignations && currentNode.IsKind(SyntaxKind.AndPattern);
Parser\LanguageParser_Patterns.cs (1)
110SyntaxKind.AndPattern,
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredPatternParenthesesDiagnosticAnalyzer.cs (1)
25private static readonly ImmutableArray<SyntaxKind> s_kinds = [SyntaxKind.AndPattern, SyntaxKind.OrPattern];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
755if (binaryPattern.IsKind(SyntaxKind.AndPattern))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
331currentToken.Parent.Kind() is SyntaxKind.AndPattern or SyntaxKind.OrPattern or SyntaxKind.RelationalPattern || 332previousToken.Parent.Kind() is SyntaxKind.AndPattern or SyntaxKind.OrPattern or SyntaxKind.RelationalPattern)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
120public int? AndPattern => (int)SyntaxKind.AndPattern;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
95p.IsDisjunctive ? SyntaxKind.OrPattern : SyntaxKind.AndPattern,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
176=> SyntaxFactory.BinaryPattern(SyntaxKind.AndPattern, (PatternSyntax)Parenthesize(left), (PatternSyntax)Parenthesize(right));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Semantics\PatternMatchingTests3.cs (6)
4213Assert.Equal(SyntaxKind.AndPattern, pattern.Kind()); 4239Assert.Equal(SyntaxKind.AndPattern, pattern.Kind()); 4271Assert.Equal(SyntaxKind.AndPattern, pattern.Kind()); 4447Assert.Equal(SyntaxKind.AndPattern, pattern.Kind()); 4473Assert.Equal(SyntaxKind.AndPattern, pattern.Kind()); 4505Assert.Equal(SyntaxKind.AndPattern, pattern.Kind());
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
238_ => BinaryPattern(AndPattern, containingPattern.Parenthesize(), generatedPattern.Parenthesize()),
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
99AnalyzedPattern.And p => BinaryPattern(SyntaxKind.AndPattern, AsPatternSyntax(p.LeftPattern, feature).Parenthesize(), AsPatternSyntax(p.RightPattern, feature).Parenthesize()),
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredPatternParenthesesDiagnosticAnalyzer.cs (1)
25private static readonly ImmutableArray<SyntaxKind> s_kinds = [SyntaxKind.AndPattern, SyntaxKind.OrPattern];
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
95p.IsDisjunctive ? SyntaxKind.OrPattern : SyntaxKind.AndPattern,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (22)
Parsing\NullableParsingTests.cs (4)
1963N(SyntaxKind.AndPattern); 2002N(SyntaxKind.AndPattern); 2163N(SyntaxKind.AndPattern); 2332N(SyntaxKind.AndPattern);
Parsing\PatternParsingTests.cs (16)
8347N(SyntaxKind.AndPattern); 8563N(SyntaxKind.AndPattern); 9851N(SyntaxKind.AndPattern); 9872N(SyntaxKind.AndPattern); 9962N(SyntaxKind.AndPattern); 10058N(SyntaxKind.AndPattern); 10113N(SyntaxKind.AndPattern); 10874N(opKind == SyntaxKind.AndKeyword ? SyntaxKind.AndPattern : SyntaxKind.OrPattern); 10992N(opKind == SyntaxKind.AndKeyword ? SyntaxKind.AndPattern : SyntaxKind.OrPattern); 11043N(opKind == SyntaxKind.AndKeyword ? SyntaxKind.AndPattern : SyntaxKind.OrPattern); 11268N(SyntaxKind.AndPattern); 11322N(SyntaxKind.AndPattern); 11493N(SyntaxKind.AndPattern); 11519N(SyntaxKind.AndPattern); 11632N(SyntaxKind.AndPattern); 11634N(SyntaxKind.AndPattern);
Parsing\PatternParsingTests2.cs (2)
1094N(SyntaxKind.AndPattern); 1170N(SyntaxKind.AndPattern);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
755if (binaryPattern.IsKind(SyntaxKind.AndPattern))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (2)
331currentToken.Parent.Kind() is SyntaxKind.AndPattern or SyntaxKind.OrPattern or SyntaxKind.RelationalPattern || 332previousToken.Parent.Kind() is SyntaxKind.AndPattern or SyntaxKind.OrPattern or SyntaxKind.RelationalPattern)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
120public int? AndPattern => (int)SyntaxKind.AndPattern;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
176=> SyntaxFactory.BinaryPattern(SyntaxKind.AndPattern, (PatternSyntax)Parenthesize(left), (PatternSyntax)Parenthesize(right));