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