25 references to Create
Microsoft.CodeAnalysis (8)
Compilation\Expression.cs (1)
32return ConstantValue.Create(value != 0);
ConstantValue.cs (1)
384case ConstantValueTypeDiscriminator.Boolean: return Create((bool)value);
MetadataReader\MetadataDecoder.cs (1)
1063return ConstantValue.Create(sigReader.ReadBoolean());
MetadataReader\PEModule.cs (1)
3713return ConstantValue.Create(reader.ReadBoolean());
Operations\ControlFlowGraphBuilder.cs (4)
2433ConstantValue constantValue = ConstantValue.Create(!isAndAlso); 2692var constantValue = ConstantValue.Create(stopValue); 3316? ConstantValue.Create(isNull) 4948isUp = new LiteralOperation(semanticModel: null, stepValue.Syntax, booleanType, constantValue: ConstantValue.Create(false), isImplicit: true);
Microsoft.CodeAnalysis.CSharp (14)
Binder\Binder_Operators.cs (1)
941return new BoundLiteral(node, ConstantValue.Create(kind == BinaryOperatorKind.Equal), GetSpecialType(SpecialType.System_Boolean, diagnostics, node));
CodeGen\CodeGenerator.cs (1)
463_builder.EmitConstantValue(ConstantValue.Create(true), syntaxNode);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (5)
834return MakeLiteral(syntax, ConstantValue.Create(kind.Operator() == BinaryOperatorKind.Equal), boolType); 861BoundExpression result = MakeLiteral(syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.NotEqual), boolType); 926return MakeLiteral(syntax, ConstantValue.Create(value), _compilation.GetSpecialType(SpecialType.System_Boolean)); 1279rewrittenAlternative: MakeLiteral(syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.Equal), boolType), 1969return MakeLiteral(syntax, ConstantValue.Create(kind == BinaryOperatorKind.NullableNullEqual), returnType);
Lowering\LocalRewriter\LocalRewriter_Index.cs (1)
18BoundExpression fromEnd = MakeLiteral(node.Syntax, ConstantValue.Create(true), booleanType);
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
127arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(isNegative), _compilation.GetSpecialType(SpecialType.System_Boolean)));
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (2)
259return new BoundLiteral(left.Syntax, ConstantValue.Create(nullnull.Kind == BinaryOperatorKind.Equal), boolType); 569return new BoundLiteral(left.Syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.Equal), boolType);
Lowering\SyntheticBoundNodeFactory.cs (1)
1145return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true };
Utilities\ValueSetFactory.BoolValueSet.cs (1)
41ConstantValue IValueSet.Sample => ConstantValue.Create(_hasTrue ? true : _hasFalse ? false : throw new ArgumentException());
Utilities\ValueSetFactory.BoolValueSetFactory.cs (1)
51ConstantValue IValueSetFactory.RandomValue(Random random) => ConstantValue.Create(random.NextDouble() < 0.5);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ConstantTests.cs (1)
4023boolConst = ConstantValue.Create(true),
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
89(SpecialType.System_Boolean, short shortVal) => ConstantValue.Create(shortVal != 0),
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
141Assert.True(ConstantValue.Create(true).IsOne);