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