1 implementation of WhenTrue
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5771public IOperation WhenTrue { get; }
47 references to WhenTrue
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue
ILLink.RoslynAnalyzer (1)
IOperationExtensions.cs (1)
164if (operation == conditionalOperation.WhenTrue
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (2)
41if (ifOperation.WhenTrue == null || ifOperation.WhenFalse != null) 69var trueStatement = UnwrapSingleStatementBlock(ifOperation.WhenTrue);
Microsoft.CodeAnalysis (9)
Generated\Operations.Generated.cs (1)
1146/// <item><description><see cref="WhenTrue" /> operation to be executed when <see cref="Condition" /> is true and</description></item>
Operations\ControlFlowGraphBuilder.cs (7)
1578VisitStatement(operation.WhenTrue); 1616Debug.Assert(operation is { WhenTrue: not null, WhenFalse: not null }); 1628if (operation.WhenTrue is IConversionOperation whenTrueConversion && whenTrueConversion.Operand.Kind == OperationKind.Throw) 1642result = VisitRequired(operation.WhenTrue); 1659VisitAndCapture(operation.WhenTrue, captureId); 2881if (ITypeSymbolHelpers.IsBooleanType(conditional.WhenTrue.Type) && 2886VisitConditionalBranchCore(conditional.WhenTrue, ref dest, jumpIfTrue);
Operations\OperationMapBuilder.cs (1)
63Visit(operation.WhenTrue, argument);
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue
Microsoft.CodeAnalysis.CodeStyle (4)
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
108return TryAddHashedSymbol(conditional.WhenTrue, seenHash: true);
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
31trueStatement = ifOperation.WhenTrue;
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
30trueStatement = ifOperation.WhenTrue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
900WhenTrue: IOperation whenTrue, 970WhenTrue: IOperation whenTrue,
Microsoft.CodeAnalysis.CSharp.Features (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
900WhenTrue: IOperation whenTrue, 970WhenTrue: IOperation whenTrue,
Microsoft.CodeAnalysis.Features (5)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (2)
106HasUnreachableEndPoint(op.WhenTrue) && 198return new AnalyzedSwitchSection(labels.ToImmutable(), operation.WhenTrue, operation.Syntax);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
108return TryAddHashedSymbol(conditional.WhenTrue, seenHash: true);
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
31trueStatement = ifOperation.WhenTrue;
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
30trueStatement = ifOperation.WhenTrue;
Microsoft.CodeAnalysis.NetAnalyzers (14)
Microsoft.NetCore.Analyzers\Performance\AvoidPotentiallyExpensiveCallWhenLogging.cs (1)
419var descendants = conditional.WhenTrue.DescendantsAndSelf();
Microsoft.NetCore.Analyzers\Performance\DoNotGuardCall.cs (1)
314guardedInvocation = GetApplicableGuardedInvocation(conditional.WhenTrue, conditionNegated);
Microsoft.NetCore.Analyzers\Performance\PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.cs (3)
169guardedPath = guardsTruePath ? conditionalOperation.WhenTrue : conditionalOperation.WhenFalse; 173guardedPath = guardsTruePath ? conditionalOperation.WhenFalse : conditionalOperation.WhenTrue; 448var whenTrue = conditionalOperation.WhenTrue;
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.Collector.cs (1)
478GetValueTypes(values, condOp.WhenTrue);
Microsoft.NetCore.Analyzers\Runtime\AvoidRedundantRegexIsMatchBeforeMatch.cs (2)
76if (conditional.WhenTrue is null) 83conditional.WhenTrue, isMatchInvocation, regexType);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.cs (1)
138IOperation? whenTrueUnwrapped = GetSingleStatementOrDefault(conditional.WhenTrue);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.Fixer.cs (4)
89if (conditional.WhenTrue is IBlockOperation block) 95editor.InsertAfter(conditional.Syntax, conditional.WhenTrue.Syntax); 128var firstWhenTrueStatement = conditional.WhenTrue is IBlockOperation block ? block.Operations.FirstOrDefault() : conditional.WhenTrue;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
1045if (operation == conditionalOperation.WhenTrue
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue
Roslyn.Diagnostics.Analyzers (3)
AbstractDoNotCopyValue.cs (2)
508var handledWhenTrue = currentIsHandled ? operation.WhenTrue : null; 1382return CombineRestrictions(Acquire(conditional.WhenTrue ?? conditional.Condition), Acquire(conditional.WhenFalse));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
190if (operation == conditionalOperation.WhenTrue