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