22 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)
3740return ConstantValue.Create(reader.ReadBoolean());
Operations\ControlFlowGraphBuilder.cs (4)
2443ConstantValue constantValue = ConstantValue.Create(!isAndAlso); 2702var constantValue = ConstantValue.Create(stopValue); 3326? ConstantValue.Create(isNull) 4959isUp = new LiteralOperation(semanticModel: null, stepValue.Syntax, booleanType, constantValue: ConstantValue.Create(false), isImplicit: true);
Microsoft.CodeAnalysis.CSharp (14)
Binder\Binder_Operators.cs (1)
973return new BoundLiteral(node, ConstantValue.Create(kind == BinaryOperatorKind.Equal), GetSpecialType(SpecialType.System_Boolean, diagnostics, node));
CodeGen\CodeGenerator.cs (1)
484_builder.EmitConstantValue(ConstantValue.Create(true), syntaxNode);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (5)
835return MakeLiteral(syntax, ConstantValue.Create(kind.Operator() == BinaryOperatorKind.Equal), boolType); 862BoundExpression result = MakeLiteral(syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.NotEqual), boolType); 927return MakeLiteral(syntax, ConstantValue.Create(value), _compilation.GetSpecialType(SpecialType.System_Boolean)); 1280rewrittenAlternative: MakeLiteral(syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.Equal), boolType), 1970return 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)
264return new BoundLiteral(left.Syntax, ConstantValue.Create(nullnull.Kind == BinaryOperatorKind.Equal), boolType); 576return new BoundLiteral(left.Syntax, ConstantValue.Create(operatorKind == BinaryOperatorKind.Equal), boolType);
Lowering\SyntheticBoundNodeFactory.cs (1)
1166return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true };
Utilities\ValueSetFactory.BoolValueSet.cs (1)
41ConstantValue IConstantValueSet.Sample => ConstantValue.Create(_hasTrue ? true : _hasFalse ? false : throw new ArgumentException());
Utilities\ValueSetFactory.BoolValueSetFactory.cs (1)
51ConstantValue IConstantValueSetFactory.RandomValue(Random random) => ConstantValue.Create(random.NextDouble() < 0.5);