19 references to Create
Microsoft.CodeAnalysis (4)
ConstantValue.cs (1)
391
case ConstantValueTypeDiscriminator.Decimal: return
Create
((decimal)value);
MetadataReader\MetadataDecoder.cs (1)
1012
value = ConstantValue.
Create
(sigReader.ReadDecimal());
MetadataReader\PEModule.cs (1)
1627
defaultValue = ConstantValue.
Create
(value);
Symbols\Attributes\CommonAttributeData.cs (1)
237
return ConstantValue.
Create
(new decimal(low, mid, high, isNegative, scale));
Microsoft.CodeAnalysis.CSharp (3)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
1276
constantOne = ConstantValue.
Create
(1m);
Utilities\ValueSetFactory.DecimalTC.cs (1)
37
public ConstantValue ToConstantValue(decimal value) => ConstantValue.
Create
(value);
Utilities\ValueSetFactory.DecimalValueSetFactory.cs (1)
25
ConstantValue IValueSetFactory.RandomValue(Random random) => ConstantValue.
Create
(DecimalTC.Instance.Random(random));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\ConstantTests.cs (1)
4018
decimalConst = ConstantValue.
Create
(1m / 3m),
Semantics\NamedAndOptionalTests.cs (6)
2277
Assert.Equal(ConstantValue.
Create
(0M), parameters[1].ExplicitDefaultConstantValue);
2283
Assert.Equal(ConstantValue.
Create
(1M), parameters[2].ExplicitDefaultConstantValue);
2296
Assert.Equal(isFromSource ? ConstantValue.
Create
(0M) : null, parameters[4].ExplicitDefaultConstantValue); // not imported for non-optional parameter
2303
Assert.Equal(isFromSource ? ConstantValue.
Create
(1M) : null, parameters[5].ExplicitDefaultConstantValue); // not imported for non-optional parameter
2309
Assert.Equal(ConstantValue.
Create
(0M), parameters[6].ExplicitDefaultConstantValue);
2315
Assert.Equal(ConstantValue.
Create
(1M), parameters[7].ExplicitDefaultConstantValue);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
105
(SpecialType.System_Decimal, decimal decimalValue) => ConstantValue.
Create
(decimalValue),
Microsoft.CodeAnalysis.UnitTests (4)
CorLibTypesTests.cs (4)
144
Assert.True(ConstantValue.
Create
((decimal)1).IsOne);
168
var cv4 = ConstantValue.
Create
((decimal)-12345m);
213
var cv91 = ConstantValue.
Create
(1.1m);
214
var cv92 = ConstantValue.
Create
(1.1m);