20 instantiations of SqlDecimal
System.Data.Common (20)
System\Data\SQLTypes\SQLDecimal.cs (19)
1177return new SqlDecimal(x); 1183return new SqlDecimal(x); 1189return new SqlDecimal(new decimal(x)); 1363SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos); 1565ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive); 1593ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ActualScale, fResPositive); 1611ret = new SqlDecimal(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive); 1726SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos); 1743return x.IsNull ? Null : new SqlDecimal(x.ByteValue); 1749return x.IsNull ? Null : new SqlDecimal(x.Value); 1755return x.IsNull ? Null : new SqlDecimal(x.Value); 1761return x.IsNull ? Null : new SqlDecimal(x.Value); 1767return x.IsNull ? Null : new SqlDecimal(x.Value); 1773return x.IsNull ? Null : new SqlDecimal(x.ToDecimal()); 1782return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1788return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 3153if (n == new SqlDecimal(0)) 3261n = new SqlDecimal(Math.Pow(dBaseNum, exp)); 3392public static readonly SqlDecimal Null = new SqlDecimal(true);
System\Data\SQLTypes\SQLMoney.cs (1)
81SqlDecimal snum = new SqlDecimal(value);
189 references to SqlDecimal
netstandard (1)
netstandard.cs (1)
580[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlDecimal))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
236[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlDecimal))]
System.Data.Common (185)
System\Data\ColumnTypeConverter.cs (1)
41typeof(SqlDecimal),
System\Data\Common\DataStorage.cs (1)
101typeof(SqlDecimal),
System\Data\Common\SQLConvert.cs (8)
125StorageType.SqlDecimal => (SqlDecimal)value, 130public static SqlDecimal ConvertToSqlDecimal(object value) 135return SqlDecimal.Null; 142StorageType.SqlDecimal => (SqlDecimal)value, 156_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlDecimal)), 186StorageType.SqlDecimal => (SqlDecimal)value, 581return SqlDecimal.Parse((string)value); // parses invariant format and is larger has larger range then Decimal 669return ((SqlDecimal)value).ToString(); // converts using invariant format and is larger has larger range then Decimal
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (22)
16private SqlDecimal[] _values = default!; // Late-initialized 19: base(column, typeof(SqlDecimal), SqlDecimal.Null, SqlDecimal.Null, StorageType.SqlDecimal) 31SqlDecimal sum = 0; 46SqlDecimal meanSum = 0; 58SqlDecimal mean = 0; 104SqlDecimal min = SqlDecimal.MaxValue; 110if ((SqlDecimal.LessThan(_values[record], min)).IsTrue) 121SqlDecimal max = SqlDecimal.MinValue; 127if ((SqlDecimal.GreaterThan(_values[record], max)).IsTrue) 155throw ExprException.Overflow(typeof(SqlDecimal)); 168return _values[recordNo].CompareTo((SqlDecimal)value); 209SqlDecimal newValue = default; 219return ((SqlDecimal)tmp); 227Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type"); 240return new SqlDecimal[recordCount]; 245SqlDecimal[] typedStore = (SqlDecimal[])store; 252_values = (SqlDecimal[])store;
System\Data\Common\SQLTypes\SQLInt64Storage.cs (1)
46SqlDecimal meanSum = 0;
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (2)
31SqlDecimal sum = 0; 46SqlDecimal meanSum = 0;
System\Data\DataColumn.cs (1)
1620dataType == typeof(SqlDecimal);
System\Data\Filter\UnaryNode.cs (1)
97value = -(SqlDecimal)vl;
System\Data\SQLTypes\SQLBoolean.cs (3)
278public static explicit operator SqlBoolean(SqlDecimal x) 418public SqlDecimal ToSqlDecimal() 420return (SqlDecimal)this;
System\Data\SQLTypes\SQLByte.cs (2)
253public static explicit operator SqlByte(SqlDecimal x) 427public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLDecimal.cs (119)
21public struct SqlDecimal : INullable, IComparable, IXmlSerializable, IEquatable<SqlDecimal> 992public static SqlDecimal Parse(string s) 997return SqlDecimal.Null; 999SqlDecimal snResult = SqlDecimal.Null; 1175public static implicit operator SqlDecimal(decimal x) 1181public static explicit operator SqlDecimal(double x) 1187public static implicit operator SqlDecimal(long x) 1193public static explicit operator decimal(SqlDecimal x) 1200public static SqlDecimal operator -(SqlDecimal x) 1206SqlDecimal s = x; 1219public static SqlDecimal operator +(SqlDecimal x, SqlDecimal y) 1363SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos); 1376public static SqlDecimal operator -(SqlDecimal x, SqlDecimal y) 1414public static SqlDecimal operator *(SqlDecimal x, SqlDecimal y) 1442SqlDecimal ret; 1653public static SqlDecimal operator /(SqlDecimal x, SqlDecimal y) 1726SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos); 1741public static explicit operator SqlDecimal(SqlBoolean x) 1747public static implicit operator SqlDecimal(SqlByte x) 1753public static implicit operator SqlDecimal(SqlInt16 x) 1759public static implicit operator SqlDecimal(SqlInt32 x) 1765public static implicit operator SqlDecimal(SqlInt64 x) 1771public static implicit operator SqlDecimal(SqlMoney x) 1780public static explicit operator SqlDecimal(SqlSingle x) 1782return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1786public static explicit operator SqlDecimal(SqlDouble x) 1788return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value); 1793public static explicit operator SqlDecimal(SqlString x) 1795return x.IsNull ? Null : SqlDecimal.Parse(x.Value); 2359public static SqlDecimal AdjustScale(SqlDecimal n, int digits, bool fRound) 2362return SqlDecimal.Null; 2364SqlDecimal ret = n; 2370public static SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int scale) 2376return SqlDecimal.Null; 2378SqlDecimal ret = n; 2422private int LAbsCmp(SqlDecimal snumOp) 2774SqlDecimal snumOp 2799SqlDecimal snumArg1 = this; 2800SqlDecimal snumArg2 = snumOp; 2863public static SqlBoolean operator ==(SqlDecimal x, SqlDecimal y) 2868public static SqlBoolean operator !=(SqlDecimal x, SqlDecimal y) 2873public static SqlBoolean operator <(SqlDecimal x, SqlDecimal y) 2878public static SqlBoolean operator >(SqlDecimal x, SqlDecimal y) 2883public static SqlBoolean operator <=(SqlDecimal x, SqlDecimal y) 2894public static SqlBoolean operator >=(SqlDecimal x, SqlDecimal y) 2911public static SqlDecimal Add(SqlDecimal x, SqlDecimal y) 2916public static SqlDecimal Subtract(SqlDecimal x, SqlDecimal y) 2922public static SqlDecimal Multiply(SqlDecimal x, SqlDecimal y) 2928public static SqlDecimal Divide(SqlDecimal x, SqlDecimal y) 2934public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y) 2940public static SqlBoolean NotEquals(SqlDecimal x, SqlDecimal y) 2946public static SqlBoolean LessThan(SqlDecimal x, SqlDecimal y) 2952public static SqlBoolean GreaterThan(SqlDecimal x, SqlDecimal y) 2958public static SqlBoolean LessThanOrEqual(SqlDecimal x, SqlDecimal y) 2964public static SqlBoolean GreaterThanOrEqual(SqlDecimal x, SqlDecimal y) 3077public static SqlDecimal Abs(SqlDecimal n) 3082return SqlDecimal.Null; 3090public static SqlDecimal Ceiling(SqlDecimal n) 3095return SqlDecimal.Null; 3118public static SqlDecimal Floor(SqlDecimal n) 3123return SqlDecimal.Null; 3146public static SqlInt32 Sign(SqlDecimal n) 3160private static SqlDecimal Round(SqlDecimal n, int lPosition, bool fTruncate) 3163return SqlDecimal.Null; 3237public static SqlDecimal Round(SqlDecimal n, int position) 3244public static SqlDecimal Truncate(SqlDecimal n, int position) 3251public static SqlDecimal Power(SqlDecimal n, double exp) 3256return SqlDecimal.Null; 3279if (value is SqlDecimal i) 3283throw ADP.WrongType(value!.GetType(), typeof(SqlDecimal)); 3286public int CompareTo(SqlDecimal value) 3302value is SqlDecimal other && Equals(other); 3307public bool Equals(SqlDecimal other) => 3317SqlDecimal ssnumTemp; 3360SqlDecimal dec = Parse(reader.ReadElementString()); 3392public static readonly SqlDecimal Null = new SqlDecimal(true); 3394public static readonly SqlDecimal MinValue = SqlDecimal.Parse("-99999999999999999999999999999999999999"); 3395public static readonly SqlDecimal MaxValue = SqlDecimal.Parse("99999999999999999999999999999999999999");
System\Data\SQLTypes\SQLDouble.cs (3)
202public static implicit operator SqlDouble(SqlDecimal x) 345public SqlDecimal ToSqlDecimal() 347return (SqlDecimal)this;
System\Data\SQLTypes\SQLInt16.cs (2)
258public static explicit operator SqlInt16(SqlDecimal x) 430public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLInt32.cs (2)
254public static explicit operator SqlInt32(SqlDecimal x) 445public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLInt64.cs (6)
296public static explicit operator SqlInt64(SqlDecimal x) 301SqlDecimal ssnumTemp = x; 314ulong dwl = SqlDecimal.DWL(ssnumTemp._data1, ssnumTemp._data2); 315if (dwl > SqlDecimal.s_llMax && (ssnumTemp.IsPositive || dwl != 1 + SqlDecimal.s_llMax)) 504public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLMoney.cs (3)
81SqlDecimal snum = new SqlDecimal(value); 356public static explicit operator SqlMoney(SqlDecimal x) 498public SqlDecimal ToSqlDecimal()
System\Data\SQLTypes\SQLSingle.cs (3)
203public static implicit operator SqlSingle(SqlDecimal x) 359public SqlDecimal ToSqlDecimal() 361return (SqlDecimal)this;
System\Data\SQLTypes\SQLString.cs (3)
500public static explicit operator SqlString(SqlDecimal x) 658public SqlDecimal ToSqlDecimal() 660return (SqlDecimal)this;
System\Data\TypeLimiter.cs (1)
157typeof(SqlDecimal),
System\Data\xmlsaver.cs (1)
239if (type == typeof(decimal) || type == typeof(SqlDecimal) || type == typeof(SqlMoney))
System.Data.Odbc (2)
System\Data\Odbc\OdbcParameter.cs (1)
545byte precision = ((SqlDecimal)(decimal)value).Precision;
System\Data\Odbc\OdbcParameterHelper.cs (1)
222return ((System.Data.SqlTypes.SqlDecimal)(decimal)value).Precision;