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