fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (11)
457internal static SqlDecimal GetSqlDecimal( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, SmiMetaData metaData ) {
458SqlDecimal result;
461result = SqlDecimal.Null;
472result = (SqlDecimal) obj;
1089SqlDecimal.Null, // SqlDbType.Decimal
1199SqlDecimal dec = GetSqlDecimal_Unchecked( sink, getters, ordinal );
1492internal static void SetSqlDecimal( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlDecimal value ) {
1626case ExtendedClrTypeCode.SqlDecimal: SetSqlDecimal_Unchecked( sink, setters, ordinal, (SqlDecimal) value ); break;
3153private static SqlDecimal GetSqlDecimal_Unchecked( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal ) {
3156SqlDecimal result = getters.GetSqlDecimal( sink, ordinal );
3488private static void SetSqlDecimal_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SqlDecimal value ) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (6)
328else if (dataType == typeof(SqlDecimal))
399else if (sqlType == typeof(SqlDecimal)) return SqlDecimal.Null;
450else if (sqlVal is SqlDecimal)
451comVal = ((SqlDecimal)sqlVal).Value;
785(38, 4, 17, true, false, false, TdsEnums.SQLNUMERICN, TdsEnums.SQLNUMERICN, MetaTypeName.DECIMAL, typeof(System.Decimal), typeof(SqlDecimal), SqlDbType.Decimal, DbType.Decimal, 2);
fx\src\data\System\Data\SqlClient\TdsParser.cs (13)
6383static internal SqlDecimal AdjustSqlDecimalScale(SqlDecimal d, int newScale) {
6385return SqlDecimal.AdjustScale(d, newScale - d.Scale, false /* Don't round, truncate. MDAC 69229 */);
6395SqlDecimal num = new SqlDecimal(value);
6397num = SqlDecimal.AdjustScale(num, newScale - oldScale, false /* Don't round, truncate. MDAC 69229 */);
6404internal byte[] SerializeSqlDecimal(SqlDecimal d, TdsParserStateObject stateObj) {
6433internal void WriteSqlDecimal(SqlDecimal d, TdsParserStateObject stateObj) {
8218value = AdjustSqlDecimalScale((SqlDecimal)value, scale);
8222if (precision < ((SqlDecimal)value).Precision) {
8223throw ADP.ParameterValueOutOfRange((SqlDecimal)value);
8230SqlDecimal sqlValue = new SqlDecimal((Decimal)value);
10066WriteSqlDecimal((SqlDecimal)value, stateObj);
11010return SerializeSqlDecimal((SqlDecimal)value, stateObj);
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (121)
991public static SqlDecimal Parse(String s) {
996return SqlDecimal.Null;
998SqlDecimal snResult = SqlDecimal.Null;
1144public static implicit operator SqlDecimal(Decimal x) {
1149public static explicit operator SqlDecimal(double x) {
1154public static implicit operator SqlDecimal(long x) {
1162public static explicit operator Decimal(SqlDecimal x) {
1171public static SqlDecimal operator -(SqlDecimal x) {
1175SqlDecimal s = x;
1191public static SqlDecimal operator +(SqlDecimal x, SqlDecimal y) {
1327SqlDecimal ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos);
1343public static SqlDecimal operator -(SqlDecimal x, SqlDecimal y) {
1383public static SqlDecimal operator *(SqlDecimal x, SqlDecimal y) {
1410SqlDecimal ret;
1615public static SqlDecimal operator /(SqlDecimal x, SqlDecimal y) {
1685SqlDecimal ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos);
1703public static explicit operator SqlDecimal(SqlBoolean x) {
1711public static implicit operator SqlDecimal(SqlByte x) {
1719public static implicit operator SqlDecimal(SqlInt16 x) {
1727public static implicit operator SqlDecimal(SqlInt32 x) {
1735public static implicit operator SqlDecimal(SqlInt64 x) {
1743public static implicit operator SqlDecimal(SqlMoney x) {
1754public static explicit operator SqlDecimal(SqlSingle x) {
1755return x.IsNull ? SqlDecimal.Null : new SqlDecimal((double)(x.Value));
1762public static explicit operator SqlDecimal(SqlDouble x) {
1763return x.IsNull ? SqlDecimal.Null : new SqlDecimal(x.Value);
1771public static explicit operator SqlDecimal(SqlString x) {
1772return x.IsNull ? Null : SqlDecimal.Parse(x.Value);
2292public static SqlDecimal AdjustScale(SqlDecimal n, int digits, bool fRound) {
2294return SqlDecimal.Null;
2296SqlDecimal ret = n;
2305public static SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int scale) {
2310return SqlDecimal.Null;
2312SqlDecimal ret = n;
2360private int LAbsCmp(SqlDecimal snumOp) {
2687SqlDecimal snumOp
2710SqlDecimal snumArg1 = this;
2711SqlDecimal snumArg2 = snumOp;
2769public static SqlBoolean operator==(SqlDecimal x, SqlDecimal y) {
2776public static SqlBoolean operator!=(SqlDecimal x, SqlDecimal y) {
2783public static SqlBoolean operator<(SqlDecimal x, SqlDecimal y) {
2790public static SqlBoolean operator>(SqlDecimal x, SqlDecimal y) {
2797public static SqlBoolean operator<=(SqlDecimal x, SqlDecimal y) {
2809public static SqlBoolean operator>=(SqlDecimal x, SqlDecimal y) {
2824public static SqlDecimal Add(SqlDecimal x, SqlDecimal y) {
2828public static SqlDecimal Subtract(SqlDecimal x, SqlDecimal y) {
2833public static SqlDecimal Multiply(SqlDecimal x, SqlDecimal y) {
2838public static SqlDecimal Divide(SqlDecimal x, SqlDecimal y) {
2843public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y) {
2848public static SqlBoolean NotEquals(SqlDecimal x, SqlDecimal y) {
2853public static SqlBoolean LessThan(SqlDecimal x, SqlDecimal y) {
2858public static SqlBoolean GreaterThan(SqlDecimal x, SqlDecimal y) {
2863public static SqlBoolean LessThanOrEqual(SqlDecimal x, SqlDecimal y) {
2868public static SqlBoolean GreaterThanOrEqual(SqlDecimal x, SqlDecimal y) {
2967public static SqlDecimal Abs(SqlDecimal n) {
2971return SqlDecimal.Null;
2982public static SqlDecimal Ceiling(SqlDecimal n) {
2986return SqlDecimal.Null;
3011public static SqlDecimal Floor(SqlDecimal n) {
3015return SqlDecimal.Null;
3040public static SqlInt32 Sign(SqlDecimal n) {
3053private static SqlDecimal Round(SqlDecimal n, int lPosition, bool fTruncate) {
3055return SqlDecimal.Null;
3124public static SqlDecimal Round(SqlDecimal n, int position) {
3133public static SqlDecimal Truncate(SqlDecimal n, int position) {
3142public static SqlDecimal Power(SqlDecimal n, double exp) {
3146return SqlDecimal.Null;
3172if (value is SqlDecimal) {
3173SqlDecimal i = (SqlDecimal)value;
3177throw ADP.WrongType(value.GetType(), typeof(SqlDecimal));
3180public int CompareTo(SqlDecimal value) {
3198if (!(value is SqlDecimal)) {
3202SqlDecimal i = (SqlDecimal)value;
3218SqlDecimal ssnumTemp;
3264SqlDecimal dec = Parse(reader.ReadElementString());
3301public static readonly SqlDecimal Null = new SqlDecimal(true);
3306public static readonly SqlDecimal MinValue = SqlDecimal.Parse("-99999999999999999999999999999999999999");
3310public static readonly SqlDecimal MaxValue = SqlDecimal.Parse("99999999999999999999999999999999999999");