2 overrides of BooleanValue
Microsoft.CodeAnalysis (2)
ConstantValueSpecialized.cs (2)
377public override bool BooleanValue 554public override bool BooleanValue
53 references to BooleanValue
Microsoft.CodeAnalysis (5)
CodeGen\ILBuilderEmit.cs (1)
614EmitBoolConstant(value.BooleanValue);
ConstantValue.cs (3)
528case ConstantValueTypeDiscriminator.Boolean: return Boxes.Box(BooleanValue); 757writer.WriteBoolean(this.BooleanValue); 824ConstantValueTypeDiscriminator.Boolean => BooleanValue.ToString(provider),
Operations\ControlFlowGraphBuilder.cs (1)
276if (current.BranchValue.GetConstantValue() is { IsBoolean: true, BooleanValue: bool constant })
Microsoft.CodeAnalysis.CSharp (37)
Binder\Binder_Operators.cs (16)
2006return valueLeft.BooleanValue & valueRight.BooleanValue; 2018return valueLeft.BooleanValue | valueRight.BooleanValue; 2030return valueLeft.BooleanValue ^ valueRight.BooleanValue; 2042return valueLeft.BooleanValue && valueRight.BooleanValue; 2044return valueLeft.BooleanValue || valueRight.BooleanValue; 2046return valueLeft.BooleanValue == valueRight.BooleanValue; 2066return valueLeft.BooleanValue != valueRight.BooleanValue; 2902return !value.BooleanValue; 3884if (!isOperatorConstantResult.BooleanValue)
Binder\Binder_Statements.cs (1)
3257var errorCode = boundFilter.ConstantValueOpt.BooleanValue
CodeGen\EmitOperators.cs (1)
488var constant = constantValue.BooleanValue;
FlowAnalysis\AbstractFlowPass.cs (4)
1017case BoundConstantPattern { ConstantValue: { IsBoolean: true, BooleanValue: var boolValue } }: 1571if (node.ConstantValueOpt is { IsBoolean: true, BooleanValue: bool booleanValue }) 2465SetConditionalState(isEquals(binary) == rightConstant.BooleanValue 2476if (IsConditionalState && isEquals(binary) != leftConstant.BooleanValue)
FlowAnalysis\NullableWalker.cs (7)
774if (returnStatement.ExpressionOpt is { ConstantValueOpt: { IsBoolean: true, BooleanValue: bool value } }) 798else if (returnStatement.ExpressionOpt is { ConstantValueOpt: { IsBoolean: true, BooleanValue: bool value } }) 1113if (returnStatement.ExpressionOpt is { ConstantValueOpt: { IsBoolean: true, BooleanValue: bool value } }) 1134else if (returnStatement.ExpressionOpt is { ConstantValueOpt: { IsBoolean: true, BooleanValue: bool value } }) 4551else if (isEquals(binary) && otherOperand.ConstantValueOpt is { IsBoolean: true, BooleanValue: var boolValue }) 4604SetConditionalState(isEquals(binary) == rightConstant.BooleanValue 4614if (IsConditionalState && isEquals(binary) != leftConstant.BooleanValue)
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (1)
80if (node.ExceptionFilterOpt?.ConstantValueOpt?.BooleanValue == false)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
95return _factory.Literal(constant.BooleanValue); 97return MakeConversionNode(_factory.Literal(!constant.BooleanValue), type, @checked: false);
Utilities\ValueSetFactory.BoolValueSet.cs (2)
56bool IValueSet.Any(BinaryOperatorKind relation, ConstantValue value) => value.IsBad || Any(relation, value.BooleanValue); 71bool IValueSet.All(BinaryOperatorKind relation, ConstantValue value) => !value.IsBad && All(relation, value.BooleanValue);
Utilities\ValueSetFactory.BoolValueSetFactory.cs (3)
55return value.IsBad ? BoolValueSet.AllValues : Related(relation, value.BooleanValue); 61return left.IsBad || right.IsBad || left.BooleanValue == right.BooleanValue;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\StructConstructorTests.cs (1)
3587Assert.False(g2.Parameters[0].ExplicitDefaultConstantValue.BooleanValue);
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
102Assert.Throws<InvalidOperationException>(() => { var c = cv1.BooleanValue; });
Microsoft.CodeAnalysis.VisualBasic (9)
Analysis\FlowAnalysis\AbstractFlowPass.vb (2)
318Return constantValue.BooleanValue 333Return Not constantValue.BooleanValue
Binding\Binder_Expressions.vb (1)
1955constVal = If(boundConditionArg.ConstantValueOpt.BooleanValue, boundWhenTrueArg.ConstantValueOpt, boundWhenFalseArg.ConstantValueOpt)
CodeGen\EmitOperators.vb (1)
606Dim constant = constValue.BooleanValue
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (1)
334node.Condition.ConstantValueOpt.BooleanValue,
Semantics\CompileTimeCalculations.vb (1)
157Case ConstantValueTypeDiscriminator.Boolean : Return If(value.BooleanValue, 1, 0)
Semantics\Operators.vb (3)
802result = ConstantValue.Create(Not operandValue.BooleanValue) 1585Dim leftValue As Boolean = left.BooleanValue 1586Dim rightValue As Boolean = right.BooleanValue