13 references to Create
Microsoft.CodeAnalysis (2)
Compilation\Expression.cs (1)
38return ConstantValue.Create(1, ConstantValueTypeDiscriminator.Int32);
ConstantValue.cs (1)
359return Create(value, discriminator);
Microsoft.CodeAnalysis.CSharp (7)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
2109return MakeLiteral(syntax, ConstantValue.Create(rewrittenExpr.ConstantValueOpt.IsNull, ConstantValueTypeDiscriminator.Boolean), boolType); 2111return MakeLiteral(syntax, ConstantValue.Create(!rewrittenExpr.ConstantValueOpt.IsNull, ConstantValueTypeDiscriminator.Boolean), boolType);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (2)
1085constantValue: ConstantValue.Create(dimension, ConstantValueTypeDiscriminator.Int32), 1139constantValue: ConstantValue.Create(dimension, ConstantValueTypeDiscriminator.Int32),
Lowering\SyntheticBoundNodeFactory.cs (2)
1781return Literal(ConstantValue.Create(rewrittenExpr.ConstantValueOpt.IsNull, ConstantValueTypeDiscriminator.Boolean), boolType); 1783return Literal(ConstantValue.Create(rewrittenExpr.ConstantValueOpt.IsNull, ConstantValueTypeDiscriminator.Boolean), boolType);
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1028return ConstantValue.Create(arg.ValueInternal, constantValueDiscriminator);
Microsoft.CodeAnalysis.UnitTests (4)
CorLibTypesTests.cs (4)
95Assert.Throws<InvalidOperationException>(() => { ConstantValue.Create(null, ConstantValueTypeDiscriminator.Bad); }); 106var cvNull = ConstantValue.Create(null, ConstantValueTypeDiscriminator.Null); 243var cv = ConstantValue.Create(null, ConstantValueTypeDiscriminator.Null); 246cv = ConstantValue.Create(null, ConstantValueTypeDiscriminator.String);