275 references to ConditionalExpression
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Expressions.cs (2)
696case SyntaxKind.ConditionalExpression: 897case SyntaxKind.ConditionalExpression: // ?:
Binder\EarlyWellKnownAttributeBinder.cs (1)
141case SyntaxKind.ConditionalExpression: // The ?: conditional operator.
Parser\LanguageParser.cs (1)
10770case SyntaxKind.ConditionalExpression:
Syntax\SyntaxNodeExtensions.cs (1)
155while (node.Parent.IsKind(SyntaxKind.ConditionalExpression))
Syntax\SyntaxNormalizer.cs (2)
684if (token.Parent.IsKind(SyntaxKind.ConditionalExpression) || token.Parent is TypeSyntax) 721&& (next.Parent.IsKind(SyntaxKind.ConditionalExpression)))
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
33=> context.RegisterSyntaxNodeAction(ProcessConditionalExpression, SyntaxKind.ConditionalExpression);
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
135case SyntaxKind.ConditionalExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
577case SyntaxKind.ConditionalExpression: 819case SyntaxKind.ConditionalExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
279if (expression.IsKind(SyntaxKind.ConditionalExpression) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (2)
96public int ConditionalExpression => (int)SyntaxKind.ConditionalExpression; 116public int TernaryConditionalExpression => (int)SyntaxKind.ConditionalExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (3)
773if (newExpression.IsKind(SyntaxKind.ConditionalExpression) && 818if (originalExpression.IsKind(SyntaxKind.ConditionalExpression) && 819newExpression.IsKind(SyntaxKind.ConditionalExpression))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
321SyntaxKind.ConditionalExpression or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2392token.Parent.IsKind(SyntaxKind.ConditionalExpression))
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
216return token.Parent?.Kind() == SyntaxKind.ConditionalExpression;
Completion\KeywordRecommenders\ThrowKeywordRecommender.cs (1)
41return context.TargetToken.Parent.IsKind(SyntaxKind.ConditionalExpression);
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
33=> context.RegisterSyntaxNodeAction(ProcessConditionalExpression, SyntaxKind.ConditionalExpression);
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
135case SyntaxKind.ConditionalExpression:
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
321SyntaxKind.ConditionalExpression or
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (241)
Parsing\AsyncParsingTests.cs (4)
2656N(SyntaxKind.ConditionalExpression); 2698N(SyntaxKind.ConditionalExpression); 2747N(SyntaxKind.ConditionalExpression); 2794N(SyntaxKind.ConditionalExpression);
Parsing\AwaitParsingTests.cs (11)
898N(SyntaxKind.ConditionalExpression); 1156N(SyntaxKind.ConditionalExpression); 1193N(SyntaxKind.ConditionalExpression); 1246N(SyntaxKind.ConditionalExpression); 1299N(SyntaxKind.ConditionalExpression); 1381N(SyntaxKind.ConditionalExpression); 1461N(SyntaxKind.ConditionalExpression); 1540N(SyntaxKind.ConditionalExpression); 1631N(SyntaxKind.ConditionalExpression); 1698N(SyntaxKind.ConditionalExpression); 1752N(SyntaxKind.ConditionalExpression);
Parsing\CollectionExpressionParsingTests.cs (62)
1876N(SyntaxKind.ConditionalExpression); 1931N(SyntaxKind.ConditionalExpression); 1970N(SyntaxKind.ConditionalExpression); 1991N(SyntaxKind.ConditionalExpression); 2340N(SyntaxKind.ConditionalExpression); 2376N(SyntaxKind.ConditionalExpression); 2522N(SyntaxKind.ConditionalExpression); 2555N(SyntaxKind.ConditionalExpression); 2604N(SyntaxKind.ConditionalExpression); 2648N(SyntaxKind.ConditionalExpression); 2708N(SyntaxKind.ConditionalExpression); 2715N(SyntaxKind.ConditionalExpression); 2754N(SyntaxKind.ConditionalExpression); 2761N(SyntaxKind.ConditionalExpression); 2816N(SyntaxKind.ConditionalExpression); 2860N(SyntaxKind.ConditionalExpression); 2920N(SyntaxKind.ConditionalExpression); 2927N(SyntaxKind.ConditionalExpression); 2966N(SyntaxKind.ConditionalExpression); 2973N(SyntaxKind.ConditionalExpression); 3028N(SyntaxKind.ConditionalExpression); 3074N(SyntaxKind.ConditionalExpression); 3126N(SyntaxKind.ConditionalExpression); 3167N(SyntaxKind.ConditionalExpression); 3219N(SyntaxKind.ConditionalExpression); 3248N(SyntaxKind.ConditionalExpression); 3293N(SyntaxKind.ConditionalExpression); 3324N(SyntaxKind.ConditionalExpression); 3375N(SyntaxKind.ConditionalExpression); 3406N(SyntaxKind.ConditionalExpression); 3413N(SyntaxKind.ConditionalExpression); 3464N(SyntaxKind.ConditionalExpression); 3495N(SyntaxKind.ConditionalExpression); 3502N(SyntaxKind.ConditionalExpression); 3553N(SyntaxKind.ConditionalExpression); 3584N(SyntaxKind.ConditionalExpression); 3591N(SyntaxKind.ConditionalExpression); 3598N(SyntaxKind.ConditionalExpression); 3644N(SyntaxKind.ConditionalExpression); 3651N(SyntaxKind.ConditionalExpression); 3671N(SyntaxKind.ConditionalExpression); 3678N(SyntaxKind.ConditionalExpression); 3685N(SyntaxKind.ConditionalExpression); 3740N(SyntaxKind.ConditionalExpression); 3747N(SyntaxKind.ConditionalExpression); 3767N(SyntaxKind.ConditionalExpression); 3774N(SyntaxKind.ConditionalExpression); 3781N(SyntaxKind.ConditionalExpression); 4818N(SyntaxKind.ConditionalExpression); 6613N(SyntaxKind.ConditionalExpression); 7294N(SyntaxKind.ConditionalExpression); 12922N(SyntaxKind.ConditionalExpression); 13001N(SyntaxKind.ConditionalExpression); 13145N(SyntaxKind.ConditionalExpression); 13299N(SyntaxKind.ConditionalExpression); 13480N(SyntaxKind.ConditionalExpression); 13666N(SyntaxKind.ConditionalExpression); 13875N(SyntaxKind.ConditionalExpression); 18124N(SyntaxKind.ConditionalExpression); 18208N(SyntaxKind.ConditionalExpression); 18448N(SyntaxKind.ConditionalExpression); 18525N(SyntaxKind.ConditionalExpression);
Parsing\DeclarationExpressionTests.cs (5)
103N(SyntaxKind.ConditionalExpression); 189N(SyntaxKind.ConditionalExpression); 232N(SyntaxKind.ConditionalExpression); 296N(SyntaxKind.ConditionalExpression); 362N(SyntaxKind.ConditionalExpression);
Parsing\DeconstructionTests.cs (1)
3255N(SyntaxKind.ConditionalExpression);
Parsing\ExpressionParsingTests.cs (7)
901Assert.Equal(SyntaxKind.ConditionalExpression, expr.Kind()); 920Assert.Equal(SyntaxKind.ConditionalExpression, expr.Kind()); 5042N(SyntaxKind.ConditionalExpression); 5978N(SyntaxKind.ConditionalExpression); 6832N(SyntaxKind.ConditionalExpression); 6886N(SyntaxKind.ConditionalExpression); 6967N(SyntaxKind.ConditionalExpression);
Parsing\ImplicitObjectCreationParsingTests.cs (1)
133N(SyntaxKind.ConditionalExpression);
Parsing\LambdaAttributeParsingTests.cs (10)
1477N(SyntaxKind.ConditionalExpression); 1524N(SyntaxKind.ConditionalExpression); 1559N(SyntaxKind.ConditionalExpression); 1607N(SyntaxKind.ConditionalExpression); 2214N(SyntaxKind.ConditionalExpression); 2266N(SyntaxKind.ConditionalExpression); 2328N(SyntaxKind.ConditionalExpression); 2390N(SyntaxKind.ConditionalExpression); 2457N(SyntaxKind.ConditionalExpression); 2641N(SyntaxKind.ConditionalExpression);
Parsing\LambdaParameterParsingTests.cs (3)
4272N(SyntaxKind.ConditionalExpression); 4279N(SyntaxKind.ConditionalExpression); 4297N(SyntaxKind.ConditionalExpression);
Parsing\LambdaReturnTypeParsingTests.cs (22)
826N(SyntaxKind.ConditionalExpression); 869N(SyntaxKind.ConditionalExpression); 942N(SyntaxKind.ConditionalExpression); 1023N(SyntaxKind.ConditionalExpression); 1119N(SyntaxKind.ConditionalExpression); 1175N(SyntaxKind.ConditionalExpression); 1225N(SyntaxKind.ConditionalExpression); 1314N(SyntaxKind.ConditionalExpression); 1370N(SyntaxKind.ConditionalExpression); 1492N(SyntaxKind.ConditionalExpression); 1720N(SyntaxKind.ConditionalExpression); 1895N(SyntaxKind.ConditionalExpression); 1902N(SyntaxKind.ConditionalExpression); 1943N(SyntaxKind.ConditionalExpression); 1950N(SyntaxKind.ConditionalExpression); 1991N(SyntaxKind.ConditionalExpression); 3135N(SyntaxKind.ConditionalExpression); 3183N(SyntaxKind.ConditionalExpression); 3226N(SyntaxKind.ConditionalExpression); 3274N(SyntaxKind.ConditionalExpression); 3317N(SyntaxKind.ConditionalExpression); 3387N(SyntaxKind.ConditionalExpression);
Parsing\NameParsingTests.cs (1)
1442N(SyntaxKind.ConditionalExpression);
Parsing\NullableParsingTests.cs (11)
336N(SyntaxKind.ConditionalExpression); 368N(SyntaxKind.ConditionalExpression); 404N(SyntaxKind.ConditionalExpression); 448N(SyntaxKind.ConditionalExpression); 563N(SyntaxKind.ConditionalExpression); 707N(SyntaxKind.ConditionalExpression); 1388N(SyntaxKind.ConditionalExpression); 2044N(SyntaxKind.ConditionalExpression); 2100N(SyntaxKind.ConditionalExpression); 2229N(SyntaxKind.ConditionalExpression); 2277N(SyntaxKind.ConditionalExpression);
Parsing\PatternParsingTests.cs (10)
2591N(SyntaxKind.ConditionalExpression); 6344N(SyntaxKind.ConditionalExpression); 6396N(SyntaxKind.ConditionalExpression); 6449N(SyntaxKind.ConditionalExpression); 6502N(SyntaxKind.ConditionalExpression); 6534N(SyntaxKind.ConditionalExpression); 10201N(SyntaxKind.ConditionalExpression); 12551N(SyntaxKind.ConditionalExpression); 12606N(SyntaxKind.ConditionalExpression); 12660N(SyntaxKind.ConditionalExpression);
Parsing\PatternParsingTests2.cs (1)
856N(SyntaxKind.ConditionalExpression);
Parsing\RangeExpressionParsingTests.cs (6)
64N(SyntaxKind.ConditionalExpression); 89N(SyntaxKind.ConditionalExpression); 114N(SyntaxKind.ConditionalExpression); 139N(SyntaxKind.ConditionalExpression); 168N(SyntaxKind.ConditionalExpression); 197N(SyntaxKind.ConditionalExpression);
Parsing\RecordParsing.cs (3)
2108N(SyntaxKind.ConditionalExpression); 2160N(SyntaxKind.ConditionalExpression); 2224N(SyntaxKind.ConditionalExpression);
Parsing\ScriptParsingTests.cs (69)
2952N(SyntaxKind.ConditionalExpression); 4568N(SyntaxKind.ConditionalExpression); 4609N(SyntaxKind.ConditionalExpression); 4653N(SyntaxKind.ConditionalExpression); 4705N(SyntaxKind.ConditionalExpression); 4757N(SyntaxKind.ConditionalExpression); 4806N(SyntaxKind.ConditionalExpression); 4855N(SyntaxKind.ConditionalExpression); 4905N(SyntaxKind.ConditionalExpression); 4963N(SyntaxKind.ConditionalExpression); 5021N(SyntaxKind.ConditionalExpression); 5082N(SyntaxKind.ConditionalExpression); 5151N(SyntaxKind.ConditionalExpression); 5203N(SyntaxKind.ConditionalExpression); 5263N(SyntaxKind.ConditionalExpression); 5325N(SyntaxKind.ConditionalExpression); 5395N(SyntaxKind.ConditionalExpression); 5471N(SyntaxKind.ConditionalExpression); 5489N(SyntaxKind.ConditionalExpression); 5549N(SyntaxKind.ConditionalExpression); 5567N(SyntaxKind.ConditionalExpression); 5630N(SyntaxKind.ConditionalExpression); 5648N(SyntaxKind.ConditionalExpression); 5725N(SyntaxKind.ConditionalExpression); 5743N(SyntaxKind.ConditionalExpression); 5757N(SyntaxKind.ConditionalExpression); 5815N(SyntaxKind.ConditionalExpression); 5864N(SyntaxKind.ConditionalExpression); 5920N(SyntaxKind.ConditionalExpression); 5969N(SyntaxKind.ConditionalExpression); 6028N(SyntaxKind.ConditionalExpression); 6092N(SyntaxKind.ConditionalExpression); 6134N(SyntaxKind.ConditionalExpression); 6179N(SyntaxKind.ConditionalExpression); 6232N(SyntaxKind.ConditionalExpression); 6251N(SyntaxKind.ConditionalExpression); 6347N(SyntaxKind.ConditionalExpression); 6354N(SyntaxKind.ConditionalExpression); 6404N(SyntaxKind.ConditionalExpression); 6453N(SyntaxKind.ConditionalExpression); 6499N(SyntaxKind.ConditionalExpression); 6551N(SyntaxKind.ConditionalExpression); 6611N(SyntaxKind.ConditionalExpression); 6680N(SyntaxKind.ConditionalExpression); 6755N(SyntaxKind.ConditionalExpression); 6824N(SyntaxKind.ConditionalExpression); 6886N(SyntaxKind.ConditionalExpression); 6956N(SyntaxKind.ConditionalExpression); 7026N(SyntaxKind.ConditionalExpression); 7096N(SyntaxKind.ConditionalExpression); 7166N(SyntaxKind.ConditionalExpression); 7236N(SyntaxKind.ConditionalExpression); 7306N(SyntaxKind.ConditionalExpression); 7380N(SyntaxKind.ConditionalExpression); 7463N(SyntaxKind.ConditionalExpression); 7481N(SyntaxKind.ConditionalExpression); 7540N(SyntaxKind.ConditionalExpression); 7596N(SyntaxKind.ConditionalExpression); 7667N(SyntaxKind.ConditionalExpression); 7741N(SyntaxKind.ConditionalExpression); 7805N(SyntaxKind.ConditionalExpression); 7823N(SyntaxKind.ConditionalExpression); 7906N(SyntaxKind.ConditionalExpression); 7924N(SyntaxKind.ConditionalExpression); 7975N(SyntaxKind.ConditionalExpression); 8088N(SyntaxKind.ConditionalExpression); 8143N(SyntaxKind.ConditionalExpression); 8213N(SyntaxKind.ConditionalExpression); 8289N(SyntaxKind.ConditionalExpression);
Parsing\StatementParsingTests.cs (4)
2972N(SyntaxKind.ConditionalExpression); 5571N(SyntaxKind.ConditionalExpression); 5861N(SyntaxKind.ConditionalExpression); 5955N(SyntaxKind.ConditionalExpression);
Parsing\SuppressNullableWarningExpressionParsingTests.cs (4)
381N(SyntaxKind.ConditionalExpression); 452N(SyntaxKind.ConditionalExpression); 526N(SyntaxKind.ConditionalExpression); 597N(SyntaxKind.ConditionalExpression);
Parsing\SwitchExpressionParsingTests.cs (3)
4362N(SyntaxKind.ConditionalExpression); 4427N(SyntaxKind.ConditionalExpression); 4858N(SyntaxKind.ConditionalExpression);
Parsing\TypeArgumentListParsingTests.cs (1)
1698N(SyntaxKind.ConditionalExpression);
Parsing\ValueTupleTests.cs (2)
748N(SyntaxKind.ConditionalExpression); 801N(SyntaxKind.ConditionalExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
Classification\ClassificationHelpers.cs (1)
373if (token.Parent.Kind() != SyntaxKind.ConditionalExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
577case SyntaxKind.ConditionalExpression: 819case SyntaxKind.ConditionalExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
279if (expression.IsKind(SyntaxKind.ConditionalExpression) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (2)
96public int ConditionalExpression => (int)SyntaxKind.ConditionalExpression; 116public int TernaryConditionalExpression => (int)SyntaxKind.ConditionalExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (3)
773if (newExpression.IsKind(SyntaxKind.ConditionalExpression) && 818if (originalExpression.IsKind(SyntaxKind.ConditionalExpression) && 819newExpression.IsKind(SyntaxKind.ConditionalExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2392token.Parent.IsKind(SyntaxKind.ConditionalExpression))