3 overrides of DecimalValue
Microsoft.CodeAnalysis (3)
ConstantValueSpecialized.cs (3)
251public override decimal DecimalValue 401public override decimal DecimalValue 579public override decimal DecimalValue
43 references to DecimalValue
Microsoft.CodeAnalysis (7)
ConstantValue.cs (3)
535case ConstantValueTypeDiscriminator.Decimal: return Boxes.Box(DecimalValue); 592return DecimalValue < 0; 831ConstantValueTypeDiscriminator.Decimal => DecimalValue.ToString(provider),
ConstantValueSpecialized.cs (3)
266return base.Equals(other) && _value == other.DecimalValue; 466return this.Discriminator == other.Discriminator && other.DecimalValue == 0m; 682return this.Discriminator == other.Discriminator && other.DecimalValue == 1m;
CryptographicHashProvider.cs (1)
257int[] bits = decimal.GetBits(constant.DecimalValue);
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder_Conversions.cs (3)
3557decimal decimalValue = CheckConstantBounds(destinationType, value.DecimalValue, out _) ? value.DecimalValue : 0m; 3679case ConstantValueTypeDiscriminator.Decimal: return value.DecimalValue;
Binder\Binder_Operators.cs (25)
2352return valueLeft.DecimalValue + valueRight.DecimalValue; 2354return valueLeft.DecimalValue - valueRight.DecimalValue; 2356return valueLeft.DecimalValue * valueRight.DecimalValue; 2358return valueLeft.DecimalValue / valueRight.DecimalValue; 2360return valueLeft.DecimalValue % valueRight.DecimalValue; 2929return valueLeft.DecimalValue == valueRight.DecimalValue; 2949return valueLeft.DecimalValue != valueRight.DecimalValue; 2965return valueLeft.DecimalValue < valueRight.DecimalValue; 2981return valueLeft.DecimalValue > valueRight.DecimalValue; 2997return valueLeft.DecimalValue <= valueRight.DecimalValue; 3013return valueLeft.DecimalValue >= valueRight.DecimalValue; 4352return -value.DecimalValue; 4357return +value.DecimalValue; 4560return valueRight.DecimalValue == 0.0m;
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2092return value.DecimalValue == 0;
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
56var value = constantValue.DecimalValue;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
129AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDecimalConstantAttribute(value.DecimalValue));
Symbols\Source\SourceParameterSymbolBase.cs (1)
95AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue));
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
215SpecialType.System_Decimal => compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue),
Utilities\ValueSetFactory.DecimalTC.cs (1)
35public decimal FromConstantValue(ConstantValue constantValue) => constantValue.IsBad ? 0m : constantValue.DecimalValue;
Microsoft.CodeAnalysis.UnitTests (2)
CorLibTypesTests.cs (2)
108Assert.Throws<InvalidOperationException>(() => { var c = cvNull.DecimalValue; }); 126Assert.Equal(1, cv1.DecimalValue);