12 implementations of FromConstantValue
Microsoft.CodeAnalysis.CSharp (12)
Utilities\ValueSetFactory.ByteTC.cs (1)
55
byte INumericTC<byte>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? (byte)0 : constantValue.ByteValue;
Utilities\ValueSetFactory.CharTC.cs (1)
49
char INumericTC<char>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? (char)0 : constantValue.CharValue;
Utilities\ValueSetFactory.DecimalTC.cs (1)
35
public decimal
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? 0m : constantValue.DecimalValue;
Utilities\ValueSetFactory.DoubleTC.cs (1)
83
double INumericTC<double>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? 0.0 : constantValue.DoubleValue;
Utilities\ValueSetFactory.IntTC.cs (1)
65
public int
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? 0 : constantValue.Int32Value;
Utilities\ValueSetFactory.LongTC.cs (1)
55
long INumericTC<long>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? 0L : constantValue.Int64Value;
Utilities\ValueSetFactory.SByteTC.cs (1)
54
sbyte INumericTC<sbyte>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? (sbyte)0 : constantValue.SByteValue;
Utilities\ValueSetFactory.ShortTC.cs (1)
55
short INumericTC<short>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? (short)0 : constantValue.Int16Value;
Utilities\ValueSetFactory.SingleTC.cs (1)
87
float INumericTC<float>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? 0.0F : constantValue.SingleValue;
Utilities\ValueSetFactory.UIntTC.cs (1)
49
public uint
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? (uint)0 : constantValue.UInt32Value;
Utilities\ValueSetFactory.ULongTC.cs (1)
55
ulong INumericTC<ulong>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? 0UL : constantValue.UInt64Value;
Utilities\ValueSetFactory.UShortTC.cs (1)
49
ushort INumericTC<ushort>.
FromConstantValue
(ConstantValue constantValue) => constantValue.IsBad ? (ushort)0 : constantValue.UInt16Value;
10 references to FromConstantValue
Microsoft.CodeAnalysis.CSharp (10)
Utilities\ValueSetFactory.FloatingValueSet.cs (2)
139
value.IsBad || this.Any(relation, _tc.
FromConstantValue
(value));
148
bool IValueSet.All(BinaryOperatorKind relation, ConstantValue value) => !value.IsBad && All(relation, _tc.
FromConstantValue
(value));
Utilities\ValueSetFactory.FloatingValueSetFactory.cs (3)
38
: FloatingValueSet<TFloating>.Related(relation, _tc.
FromConstantValue
(value), _tc);
42
return _tc.Related(relation, _tc.
FromConstantValue
(left), _tc.
FromConstantValue
(right));
Utilities\ValueSetFactory.NumericValueSet.cs (2)
107
bool IValueSet.Any(BinaryOperatorKind relation, ConstantValue value) => value.IsBad || Any(relation, _tc.
FromConstantValue
(value));
129
bool IValueSet.All(BinaryOperatorKind relation, ConstantValue value) => !value.IsBad && All(relation, _tc.
FromConstantValue
(value));
Utilities\ValueSetFactory.NumericValueSetFactory.cs (3)
53
value.IsBad ? NumericValueSet<T>.AllValues(_tc) : Related(relation, _tc.
FromConstantValue
(value));
65
return _tc.Related(relation, _tc.
FromConstantValue
(left), _tc.
FromConstantValue
(right));