20 instantiations of SqlDecimal
System.Data.Common (20)
System\Data\SQLTypes\SQLDecimal.cs (19)
1184
return new
SqlDecimal
(x);
1190
return new
SqlDecimal
(x);
1196
return new
SqlDecimal
(new decimal(x));
1370
SqlDecimal ret = new
SqlDecimal
(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos);
1572
ret = new
SqlDecimal
(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive);
1600
ret = new
SqlDecimal
(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ActualScale, fResPositive);
1618
ret = new
SqlDecimal
(rgulRes, (byte)culRes, (byte)ResPrec, (byte)ResScale, fResPositive);
1733
SqlDecimal ret = new
SqlDecimal
(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos);
1750
return x.IsNull ? Null : new
SqlDecimal
(x.ByteValue);
1756
return x.IsNull ? Null : new
SqlDecimal
(x.Value);
1762
return x.IsNull ? Null : new
SqlDecimal
(x.Value);
1768
return x.IsNull ? Null : new
SqlDecimal
(x.Value);
1774
return x.IsNull ? Null : new
SqlDecimal
(x.Value);
1780
return x.IsNull ? Null : new
SqlDecimal
(x.ToDecimal());
1789
return x.IsNull ? SqlDecimal.Null : new
SqlDecimal
(x.Value);
1795
return x.IsNull ? SqlDecimal.Null : new
SqlDecimal
(x.Value);
3160
if (n == new
SqlDecimal
(0))
3268
n = new
SqlDecimal
(Math.Pow(dBaseNum, exp));
3399
public static readonly SqlDecimal Null = new
SqlDecimal
(true);
System\Data\SQLTypes\SQLMoney.cs (1)
81
SqlDecimal snum = new
SqlDecimal
(value);
191 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 (187)
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 (121)
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;
1158
/// Writes the TDS (Tabular Data Stream) representation of this <see cref="
SqlDecimal
" /> to the specified destination.
1162
/// <exception cref="SqlNullValueException">Thrown when the <see cref="
SqlDecimal
" /> is <see langword="null" />.</exception>
1182
public static implicit operator
SqlDecimal
(decimal x)
1188
public static explicit operator
SqlDecimal
(double x)
1194
public static implicit operator
SqlDecimal
(long x)
1200
public static explicit operator decimal(
SqlDecimal
x)
1207
public static
SqlDecimal
operator -(
SqlDecimal
x)
1213
SqlDecimal
s = x;
1226
public static
SqlDecimal
operator +(
SqlDecimal
x,
SqlDecimal
y)
1370
SqlDecimal
ret = new SqlDecimal(rglData1, bLen, (byte)ResPrec, (byte)ResScale, fResSignPos);
1383
public static
SqlDecimal
operator -(
SqlDecimal
x,
SqlDecimal
y)
1421
public static
SqlDecimal
operator *(
SqlDecimal
x,
SqlDecimal
y)
1449
SqlDecimal
ret;
1660
public static
SqlDecimal
operator /(
SqlDecimal
x,
SqlDecimal
y)
1733
SqlDecimal
ret = new SqlDecimal(rgulQ, (byte)culQ, (byte)ResPrec, (byte)ResScale, fResSignPos);
1748
public static explicit operator
SqlDecimal
(SqlBoolean x)
1754
public static implicit operator
SqlDecimal
(SqlByte x)
1760
public static implicit operator
SqlDecimal
(SqlInt16 x)
1766
public static implicit operator
SqlDecimal
(SqlInt32 x)
1772
public static implicit operator
SqlDecimal
(SqlInt64 x)
1778
public static implicit operator
SqlDecimal
(SqlMoney x)
1787
public static explicit operator
SqlDecimal
(SqlSingle x)
1789
return x.IsNull ?
SqlDecimal
.Null : new SqlDecimal(x.Value);
1793
public static explicit operator
SqlDecimal
(SqlDouble x)
1795
return x.IsNull ?
SqlDecimal
.Null : new SqlDecimal(x.Value);
1800
public static explicit operator
SqlDecimal
(SqlString x)
1802
return x.IsNull ? Null :
SqlDecimal
.Parse(x.Value);
2366
public static
SqlDecimal
AdjustScale(
SqlDecimal
n, int digits, bool fRound)
2369
return
SqlDecimal
.Null;
2371
SqlDecimal
ret = n;
2377
public static
SqlDecimal
ConvertToPrecScale(
SqlDecimal
n, int precision, int scale)
2383
return
SqlDecimal
.Null;
2385
SqlDecimal
ret = n;
2429
private int LAbsCmp(
SqlDecimal
snumOp)
2781
SqlDecimal
snumOp
2806
SqlDecimal
snumArg1 = this;
2807
SqlDecimal
snumArg2 = snumOp;
2870
public static SqlBoolean operator ==(
SqlDecimal
x,
SqlDecimal
y)
2875
public static SqlBoolean operator !=(
SqlDecimal
x,
SqlDecimal
y)
2880
public static SqlBoolean operator <(
SqlDecimal
x,
SqlDecimal
y)
2885
public static SqlBoolean operator >(
SqlDecimal
x,
SqlDecimal
y)
2890
public static SqlBoolean operator <=(
SqlDecimal
x,
SqlDecimal
y)
2901
public static SqlBoolean operator >=(
SqlDecimal
x,
SqlDecimal
y)
2918
public static
SqlDecimal
Add(
SqlDecimal
x,
SqlDecimal
y)
2923
public static
SqlDecimal
Subtract(
SqlDecimal
x,
SqlDecimal
y)
2929
public static
SqlDecimal
Multiply(
SqlDecimal
x,
SqlDecimal
y)
2935
public static
SqlDecimal
Divide(
SqlDecimal
x,
SqlDecimal
y)
2941
public static SqlBoolean Equals(
SqlDecimal
x,
SqlDecimal
y)
2947
public static SqlBoolean NotEquals(
SqlDecimal
x,
SqlDecimal
y)
2953
public static SqlBoolean LessThan(
SqlDecimal
x,
SqlDecimal
y)
2959
public static SqlBoolean GreaterThan(
SqlDecimal
x,
SqlDecimal
y)
2965
public static SqlBoolean LessThanOrEqual(
SqlDecimal
x,
SqlDecimal
y)
2971
public static SqlBoolean GreaterThanOrEqual(
SqlDecimal
x,
SqlDecimal
y)
3084
public static
SqlDecimal
Abs(
SqlDecimal
n)
3089
return
SqlDecimal
.Null;
3097
public static
SqlDecimal
Ceiling(
SqlDecimal
n)
3102
return
SqlDecimal
.Null;
3125
public static
SqlDecimal
Floor(
SqlDecimal
n)
3130
return
SqlDecimal
.Null;
3153
public static SqlInt32 Sign(
SqlDecimal
n)
3167
private static
SqlDecimal
Round(
SqlDecimal
n, int lPosition, bool fTruncate)
3170
return
SqlDecimal
.Null;
3244
public static
SqlDecimal
Round(
SqlDecimal
n, int position)
3251
public static
SqlDecimal
Truncate(
SqlDecimal
n, int position)
3258
public static
SqlDecimal
Power(
SqlDecimal
n, double exp)
3263
return
SqlDecimal
.Null;
3286
if (value is
SqlDecimal
i)
3290
throw ADP.WrongType(value!.GetType(), typeof(
SqlDecimal
));
3293
public int CompareTo(
SqlDecimal
value)
3309
value is
SqlDecimal
other && Equals(other);
3314
public bool Equals(
SqlDecimal
other) =>
3324
SqlDecimal
ssnumTemp;
3367
SqlDecimal
dec = Parse(reader.ReadElementString());
3399
public static readonly
SqlDecimal
Null = new SqlDecimal(true);
3401
public static readonly
SqlDecimal
MinValue =
SqlDecimal
.Parse("-99999999999999999999999999999999999999");
3402
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);
366
public static explicit operator SqlMoney(
SqlDecimal
x)
508
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;