1 implementation of WhenFalse
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5732public IOperation? WhenFalse { get; }
42 references to WhenFalse
ILLink.RoslynAnalyzer (1)
IOperationExtensions.cs (1)
146 || operation == conditionalOperation.WhenFalse) {
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
41if (ifOperation.WhenTrue == null || ifOperation.WhenFalse != null)
Microsoft.CodeAnalysis (13)
Generated\Operations.Generated.cs (1)
1147/// <item><description><see cref="WhenFalse" /> operation to be executed when the <see cref="Condition" /> is false</description></item>
Operations\ControlFlowGraphBuilder.cs (10)
1574if (operation.WhenFalse is IConditionalOperation nested) 1584if (operation.WhenFalse is not null) 1586VisitStatement(operation.WhenFalse); 1607Debug.Assert(operation is { WhenTrue: not null, WhenFalse: not null }); 1629result = VisitRequired(operation.WhenFalse); 1631else if (operation.WhenFalse is IConversionOperation whenFalseConversion && whenFalseConversion.Operand.Kind == OperationKind.Throw) 1656VisitAndCapture(operation.WhenFalse, captureId); 2870Debug.Assert(conditional.WhenFalse is not null); 2872ITypeSymbolHelpers.IsBooleanType(conditional.WhenFalse.Type)) 2882VisitConditionalBranchCore(conditional.WhenFalse, ref dest, jumpIfTrue);
Operations\OperationMapBuilder.cs (2)
64if (operation.WhenFalse is IConditionalOperation nested) 70Visit(operation.WhenFalse, argument);
Microsoft.CodeAnalysis.CodeStyle (7)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
102RoslynDebug.Assert(conditional.WhenFalse is not null); 103return TryAddHashedSymbol(conditional.WhenFalse, seenHash: true);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
29falseStatement = ifOperation.WhenFalse;
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (2)
29falseStatement = ifOperation.WhenFalse; 104ifOperation.WhenFalse == null)
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
91if (ifOperation.WhenFalse != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
188|| operation == conditionalOperation.WhenFalse)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
89if (ifOperation.WhenFalse == null)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
902WhenFalse: var whenFalse, 972WhenFalse: var whenFalse,
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
902WhenFalse: var whenFalse, 972WhenFalse: var whenFalse,
Microsoft.CodeAnalysis.Features (11)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (4)
103operations[current] is IConditionalOperation { WhenFalse: null } op && 165if (op.WhenFalse is null) 169else if (!ParseIfStatementOrBlock(op.WhenFalse, sections, out defaultBodyOpt)) 171defaultBodyOpt = op.WhenFalse;
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
102RoslynDebug.Assert(conditional.WhenFalse is not null); 103return TryAddHashedSymbol(conditional.WhenFalse, seenHash: true);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
29falseStatement = ifOperation.WhenFalse;
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (2)
29falseStatement = ifOperation.WhenFalse; 104ifOperation.WhenFalse == null)
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
91if (ifOperation.WhenFalse != null)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
89if (ifOperation.WhenFalse == null)
Microsoft.CodeAnalysis.Test.Utilities (3)
Compilation\OperationTreeVerifier.cs (1)
1286Visit(operation.WhenFalse, "WhenFalse");
Compilation\TestOperationVisitor.cs (2)
891if (operation.WhenFalse != null) 893AssertEx.Equal(new[] { operation.Condition, operation.WhenTrue, operation.WhenFalse }, operation.ChildOperations);
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
188|| operation == conditionalOperation.WhenFalse)