123 references to IfStatement
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_Statements.cs (2)
75case SyntaxKind.IfStatement: 334case SyntaxKind.IfStatement:
Binder\ExpressionVariableFinder.cs (1)
46case SyntaxKind.IfStatement:
Binder\LocalBinderFactory.cs (1)
1049case SyntaxKind.IfStatement:
Binder\LocalScopeBinder.cs (1)
261case SyntaxKind.IfStatement:
Lowering\Instrumentation\Instrumenter.cs (2)
194Debug.Assert(original.Syntax.Kind() == SyntaxKind.IfStatement); 201Debug.Assert(original.Syntax.Kind() == SyntaxKind.IfStatement);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5214case SyntaxKind.IfStatement:
Syntax\LambdaUtilities.cs (1)
410case SyntaxKind.IfStatement:
Syntax\LookupPosition.cs (2)
342case SyntaxKind.IfStatement: 405case SyntaxKind.IfStatement:
Syntax\SyntaxNormalizer.cs (1)
1333if (node.IsKind(SyntaxKind.IfStatement) && node.Parent.IsKind(SyntaxKind.ElseClause))
Microsoft.CodeAnalysis.CSharp.CodeStyle (17)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (4)
34SyntaxKind.IfStatement, 67case SyntaxKind.IfStatement when statement.Kind() == SyntaxKind.ElseClause: 239if (statement.Kind() is not (SyntaxKind.IfStatement or SyntaxKind.ElseClause)) 274Debug.Assert(ifStatementOrElseClause.IsKind(SyntaxKind.IfStatement));
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
37=> context.RegisterSyntaxNodeAction(SyntaxNodeAction, SyntaxKind.IfStatement);
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
97if (statement.IsKind(SyntaxKind.IfStatement) && parentIsElseClause)
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (1)
29=> SyntaxKind.IfStatement;
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
50context.RegisterSyntaxNodeAction(AnalyzeIfStatement, SyntaxKind.IfStatement);
src\Analyzers\CSharp\Analyzers\UseNullPropagation\CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
32=> SyntaxKind.IfStatement;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
163case SyntaxKind.IfStatement:
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
174if (!isExpression.Parent.IsKind(SyntaxKind.IfStatement, out ifStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
578case SyntaxKind.IfStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
143currentToken.Parent.IsParentKind(SyntaxKind.IfStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
53case SyntaxKind.IfStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
613return syntaxKind is SyntaxKind.IfStatement or SyntaxKind.WhileStatement or SyntaxKind.SwitchStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
143public int IfStatement => (int)SyntaxKind.IfStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
357node.Kind() is SyntaxKind.IfStatement or
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
168or SyntaxKind.IfStatement
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\LocalSlotMappingTests.cs (1)
3388ImmutableArray.Create(SemanticEdit.Create(SemanticEditKind.Update, method0, method1, GetSyntaxMapByKind(method0, SyntaxKind.IfStatement))));
Microsoft.CodeAnalysis.CSharp.Features (27)
BraceCompletion\CurlyBraceCompletionService.cs (1)
210case SyntaxKind.IfStatement:
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
85case SyntaxKind.IfStatement: 272case SyntaxKind.IfStatement:
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
108case SyntaxKind.IfStatement:
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
202case SyntaxKind.IfStatement: 258case SyntaxKind.IfStatement:
EditAndContinue\BreakpointSpans.cs (1)
724case SyntaxKind.IfStatement:
EditAndContinue\SyntaxComparer.cs (3)
409case SyntaxKind.IfStatement: 874case SyntaxKind.IfStatement: 1055case SyntaxKind.IfStatement:
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
366if (statement.Kind() == SyntaxKind.IfStatement &&
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (1)
171if (statement.IsKind(SyntaxKind.IfStatement))
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (4)
34SyntaxKind.IfStatement, 67case SyntaxKind.IfStatement when statement.Kind() == SyntaxKind.ElseClause: 239if (statement.Kind() is not (SyntaxKind.IfStatement or SyntaxKind.ElseClause)) 274Debug.Assert(ifStatementOrElseClause.IsKind(SyntaxKind.IfStatement));
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
37=> context.RegisterSyntaxNodeAction(SyntaxNodeAction, SyntaxKind.IfStatement);
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
97if (statement.IsKind(SyntaxKind.IfStatement) && parentIsElseClause)
src\Analyzers\CSharp\Analyzers\UseCoalesceExpression\CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (1)
29=> SyntaxKind.IfStatement;
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
50context.RegisterSyntaxNodeAction(AnalyzeIfStatement, SyntaxKind.IfStatement);
src\Analyzers\CSharp\Analyzers\UseNullPropagation\CSharpUseNullPropagationDiagnosticAnalyzer.cs (1)
32=> SyntaxKind.IfStatement;
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
163case SyntaxKind.IfStatement:
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
174if (!isExpression.Parent.IsKind(SyntaxKind.IfStatement, out ifStatement))
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
410case SyntaxKind.IfStatement:
Structure\Providers\BlockSyntaxStructureProvider.cs (3)
153if (parent.IsKind(SyntaxKind.IfStatement) && parent.IsParentKind(SyntaxKind.ElseClause)) 176if (node.Parent.IsKind(SyntaxKind.IfStatement)) 214SyntaxKind.IfStatement => BlockTypes.Conditional,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (53)
IncrementalParsing\IncrementalParsingTests.cs (2)
696N(SyntaxKind.IfStatement); 711N(SyntaxKind.IfStatement);
Parsing\DeclarationExpressionTests.cs (5)
65N(SyntaxKind.IfStatement); 99N(SyntaxKind.IfStatement); 143N(SyntaxKind.IfStatement); 185N(SyntaxKind.IfStatement); 228N(SyntaxKind.IfStatement);
Parsing\DeconstructionTests.cs (2)
2696N(SyntaxKind.IfStatement); 2758N(SyntaxKind.IfStatement);
Parsing\MemberDeclarationParsingTests.cs (1)
12483N(SyntaxKind.IfStatement);
Parsing\ParsingErrorRecoveryTests.cs (17)
3046Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3069Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3093Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3117Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3139Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3162Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3185Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3208Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3231Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3584Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3609Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3634Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3903Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3929Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 3955Assert.Equal(SyntaxKind.IfStatement, ms.Body.Statements[1].Kind()); 5520N(SyntaxKind.IfStatement); 5633N(SyntaxKind.IfStatement);
Parsing\PatternParsingTests.cs (13)
2852N(SyntaxKind.IfStatement); 3060N(SyntaxKind.IfStatement); 3118N(SyntaxKind.IfStatement); 3178N(SyntaxKind.IfStatement); 3243N(SyntaxKind.IfStatement); 3310N(SyntaxKind.IfStatement); 3368N(SyntaxKind.IfStatement); 3428N(SyntaxKind.IfStatement); 3493N(SyntaxKind.IfStatement); 3560N(SyntaxKind.IfStatement); 3634N(SyntaxKind.IfStatement); 3710N(SyntaxKind.IfStatement); 3791N(SyntaxKind.IfStatement);
Parsing\StatementAttributeParsingTests.cs (2)
2192N(SyntaxKind.IfStatement); 3211N(SyntaxKind.IfStatement);
Parsing\StatementParsingTests.cs (11)
2018Assert.Equal(SyntaxKind.IfStatement, statement.Kind()); 2041Assert.Equal(SyntaxKind.IfStatement, statement.Kind()); 2067Assert.Equal(SyntaxKind.IfStatement, statement.Kind()); 3553Assert.Equal(SyntaxKind.IfStatement, statement.Kind()); 3614N(SyntaxKind.IfStatement); 3689N(SyntaxKind.IfStatement); 3716N(SyntaxKind.IfStatement); 3775N(SyntaxKind.IfStatement); 3799N(SyntaxKind.IfStatement); 3855N(SyntaxKind.IfStatement); 3864N(SyntaxKind.IfStatement);
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Classification\ClassificationHelpers.cs (1)
121case SyntaxKind.IfStatement:
Simplification\Reducers\CSharpMiscellaneousReducer.cs (3)
142if (!node.Parent.IsKind(SyntaxKind.IfStatement)) 148if (node.Parent?.Parent is (kind: SyntaxKind.IfStatement or SyntaxKind.ElseClause)) 182case SyntaxKind.IfStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
578case SyntaxKind.IfStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
143currentToken.Parent.IsParentKind(SyntaxKind.IfStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
53case SyntaxKind.IfStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
613return syntaxKind is SyntaxKind.IfStatement or SyntaxKind.WhileStatement or SyntaxKind.SwitchStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
143public int IfStatement => (int)SyntaxKind.IfStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
357node.Kind() is SyntaxKind.IfStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
168or SyntaxKind.IfStatement
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\AppContextDefaultsAnalyzer.cs (1)
80var containingIfStatement = call.Ancestors().FirstOrDefault(n => n.IsKind(SyntaxKind.IfStatement)) as IfStatementSyntax;