119 references to IfStatement
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_Statements.cs (2)
74
case SyntaxKind.
IfStatement
:
331
case SyntaxKind.
IfStatement
:
Binder\ExpressionVariableFinder.cs (1)
46
case SyntaxKind.
IfStatement
:
Binder\LocalBinderFactory.cs (1)
953
case SyntaxKind.
IfStatement
:
Binder\LocalScopeBinder.cs (1)
225
case SyntaxKind.
IfStatement
:
Lowering\Instrumentation\Instrumenter.cs (2)
193
Debug.Assert(original.Syntax.Kind() == SyntaxKind.
IfStatement
);
200
Debug.Assert(original.Syntax.Kind() == SyntaxKind.
IfStatement
);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4945
case SyntaxKind.
IfStatement
:
Syntax\LambdaUtilities.cs (1)
409
case SyntaxKind.
IfStatement
:
Syntax\LookupPosition.cs (2)
342
case SyntaxKind.
IfStatement
:
405
case SyntaxKind.
IfStatement
:
Syntax\SyntaxNormalizer.cs (1)
1325
if (node.IsKind(SyntaxKind.
IfStatement
) && node.Parent.IsKind(SyntaxKind.ElseClause))
Microsoft.CodeAnalysis.CSharp.CodeStyle (17)
CSharpAddBracesDiagnosticAnalyzer.cs (4)
34
SyntaxKind.
IfStatement
,
66
case SyntaxKind.
IfStatement
when statement.Kind() == SyntaxKind.ElseClause:
237
if (statement.Kind() is not (SyntaxKind.
IfStatement
or SyntaxKind.ElseClause))
272
Debug.Assert(ifStatementOrElseClause.IsKind(SyntaxKind.
IfStatement
));
CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
163
case SyntaxKind.
IfStatement
:
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
163
if (!isExpression.Parent.IsKind(SyntaxKind.
IfStatement
, out ifStatement))
CSharpSyntaxKinds.cs (1)
131
public int IfStatement => (int)SyntaxKind.
IfStatement
;
CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (1)
29
=> SyntaxKind.
IfStatement
;
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
50
context.RegisterSyntaxNodeAction(AnalyzeIfStatement, SyntaxKind.
IfStatement
);
CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
31
protected override SyntaxKind IfStatementSyntaxKind => SyntaxKind.
IfStatement
;
ElasticTriviaFormattingRule.cs (1)
131
currentToken.Parent.IsParentKind(SyntaxKind.
IfStatement
))
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
92
if (statement.IsKind(SyntaxKind.
IfStatement
) && parentIsElseClause)
ExpressionSyntaxExtensions.cs (1)
563
case SyntaxKind.
IfStatement
:
FormattingRangeHelper.cs (1)
357
node.Kind() is SyntaxKind.
IfStatement
or
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
37
=> context.RegisterSyntaxNodeAction(SyntaxNodeAction, SyntaxKind.
IfStatement
);
NewLineUserSettingFormattingRule.cs (1)
53
case SyntaxKind.
IfStatement
:
SpacingFormattingRule.cs (1)
610
return syntaxKind is SyntaxKind.
IfStatement
or SyntaxKind.WhileStatement or SyntaxKind.SwitchStatement or
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
167
parent.IsKind(SyntaxKind.
IfStatement
) ||
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\EditAndContinue\LocalSlotMappingTests.cs (1)
3265
ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.
IfStatement
), preserveLocalVariables: true)));
Microsoft.CodeAnalysis.CSharp.Features (30)
BraceCompletion\CurlyBraceCompletionService.cs (1)
216
case SyntaxKind.
IfStatement
:
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
85
case SyntaxKind.
IfStatement
:
273
case SyntaxKind.
IfStatement
:
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
108
case SyntaxKind.
IfStatement
:
CSharpAddBracesDiagnosticAnalyzer.cs (4)
34
SyntaxKind.
IfStatement
,
66
case SyntaxKind.
IfStatement
when statement.Kind() == SyntaxKind.ElseClause:
237
if (statement.Kind() is not (SyntaxKind.
IfStatement
or SyntaxKind.ElseClause))
272
Debug.Assert(ifStatementOrElseClause.IsKind(SyntaxKind.
IfStatement
));
CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
163
case SyntaxKind.
IfStatement
:
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
163
if (!isExpression.Parent.IsKind(SyntaxKind.
IfStatement
, out ifStatement))
CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (1)
29
=> SyntaxKind.
IfStatement
;
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
50
context.RegisterSyntaxNodeAction(AnalyzeIfStatement, SyntaxKind.
IfStatement
);
CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
31
protected override SyntaxKind IfStatementSyntaxKind => SyntaxKind.
IfStatement
;
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
208
case SyntaxKind.
IfStatement
:
264
case SyntaxKind.
IfStatement
:
EditAndContinue\BreakpointSpans.cs (1)
543
case SyntaxKind.
IfStatement
:
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
1037
case SyntaxKind.
IfStatement
:
1763
case SyntaxKind.
IfStatement
:
2805
case SyntaxKind.
IfStatement
:
EditAndContinue\SyntaxComparer.cs (3)
408
case SyntaxKind.
IfStatement
:
865
case SyntaxKind.
IfStatement
:
1046
case SyntaxKind.
IfStatement
:
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
92
if (statement.IsKind(SyntaxKind.
IfStatement
) && parentIsElseClause)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
363
if (statement.Kind() == SyntaxKind.
IfStatement
&&
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
37
=> context.RegisterSyntaxNodeAction(SyntaxNodeAction, SyntaxKind.
IfStatement
);
LambdaUtilities.cs (1)
409
case SyntaxKind.
IfStatement
:
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (1)
169
if (statement.IsKind(SyntaxKind.
IfStatement
))
Structure\Providers\BlockSyntaxStructureProvider.cs (3)
85
if (parent.IsKind(SyntaxKind.
IfStatement
) && parent.IsParentKind(SyntaxKind.ElseClause))
108
if (node.Parent.IsKind(SyntaxKind.
IfStatement
))
150
case SyntaxKind.
IfStatement
: return BlockTypes.Conditional;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (47)
Parsing\DeclarationExpressionTests.cs (4)
64
N(SyntaxKind.
IfStatement
);
98
N(SyntaxKind.
IfStatement
);
148
N(SyntaxKind.
IfStatement
);
191
N(SyntaxKind.
IfStatement
);
Parsing\DeconstructionTests.cs (2)
2696
N(SyntaxKind.
IfStatement
);
2758
N(SyntaxKind.
IfStatement
);
Parsing\ParsingErrorRecoveryTests.cs (15)
2884
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
2907
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
2931
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
2955
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
2977
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3000
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3023
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3046
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3069
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3422
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3447
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3472
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3741
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3767
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
3793
Assert.Equal(SyntaxKind.
IfStatement
, ms.Body.Statements[1].Kind());
Parsing\PatternParsingTests.cs (13)
2891
N(SyntaxKind.
IfStatement
);
3099
N(SyntaxKind.
IfStatement
);
3157
N(SyntaxKind.
IfStatement
);
3217
N(SyntaxKind.
IfStatement
);
3282
N(SyntaxKind.
IfStatement
);
3349
N(SyntaxKind.
IfStatement
);
3407
N(SyntaxKind.
IfStatement
);
3467
N(SyntaxKind.
IfStatement
);
3532
N(SyntaxKind.
IfStatement
);
3599
N(SyntaxKind.
IfStatement
);
3673
N(SyntaxKind.
IfStatement
);
3749
N(SyntaxKind.
IfStatement
);
3830
N(SyntaxKind.
IfStatement
);
Parsing\StatementAttributeParsingTests.cs (2)
2191
N(SyntaxKind.
IfStatement
);
3210
N(SyntaxKind.
IfStatement
);
Parsing\StatementParsingTests.cs (11)
2018
Assert.Equal(SyntaxKind.
IfStatement
, statement.Kind());
2041
Assert.Equal(SyntaxKind.
IfStatement
, statement.Kind());
2067
Assert.Equal(SyntaxKind.
IfStatement
, statement.Kind());
3550
Assert.Equal(SyntaxKind.
IfStatement
, statement.Kind());
3613
N(SyntaxKind.
IfStatement
);
3688
N(SyntaxKind.
IfStatement
);
3715
N(SyntaxKind.
IfStatement
);
3774
N(SyntaxKind.
IfStatement
);
3798
N(SyntaxKind.
IfStatement
);
3854
N(SyntaxKind.
IfStatement
);
3863
N(SyntaxKind.
IfStatement
);
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Classification\ClassificationHelpers.cs (1)
121
case SyntaxKind.
IfStatement
:
CSharpSyntaxKinds.cs (1)
131
public int IfStatement => (int)SyntaxKind.
IfStatement
;
ElasticTriviaFormattingRule.cs (1)
131
currentToken.Parent.IsParentKind(SyntaxKind.
IfStatement
))
FormattingRangeHelper.cs (1)
357
node.Kind() is SyntaxKind.
IfStatement
or
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (1)
563
case SyntaxKind.
IfStatement
:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
167
parent.IsKind(SyntaxKind.
IfStatement
) ||
NewLineUserSettingFormattingRule.cs (1)
53
case SyntaxKind.
IfStatement
:
Simplification\Reducers\CSharpMiscellaneousReducer.cs (3)
144
if (!node.Parent.IsKind(SyntaxKind.
IfStatement
))
150
if (node.Parent?.Parent is (kind: SyntaxKind.
IfStatement
or SyntaxKind.ElseClause))
184
case SyntaxKind.
IfStatement
:
SpacingFormattingRule.cs (1)
610
return syntaxKind is SyntaxKind.
IfStatement
or SyntaxKind.WhileStatement or SyntaxKind.SwitchStatement or