26 instantiations of SqlMoney
System.Data.Common (26)
System\Data\Common\SQLConvert.cs (1)
593
return new
SqlMoney
(XmlConvert.ToDecimal((string)value));
System\Data\SQLTypes\SQLMoney.cs (25)
179
return new
SqlMoney
(x);
185
return new
SqlMoney
(x);
191
return new
SqlMoney
(new decimal(x));
242
money = new
SqlMoney
(d);
246
money = new
SqlMoney
(decimal.Parse(s, NumberStyles.Currency, NumberFormatInfo.CurrentInfo));
254
return new
SqlMoney
(value, 0);
264
return new
SqlMoney
(-x._value, 0);
275
return (x.IsNull || y.IsNull) ? Null : new
SqlMoney
(checked(x._value + y._value), 0);
287
return (x.IsNull || y.IsNull) ? Null : new
SqlMoney
(checked(x._value - y._value), 0);
298
new
SqlMoney
(decimal.Multiply(x.ToDecimal(), y.ToDecimal()));
304
new
SqlMoney
(decimal.Divide(x.ToDecimal(), y.ToDecimal()));
313
return x.IsNull ? Null : new
SqlMoney
(x.ByteValue);
319
return x.IsNull ? Null : new
SqlMoney
(x.Value);
325
return x.IsNull ? Null : new
SqlMoney
(x.Value);
331
return x.IsNull ? Null : new
SqlMoney
(x.Value);
337
return x.IsNull ? Null : new
SqlMoney
(x.Value);
346
return x.IsNull ? Null : new
SqlMoney
(x.Value);
352
return x.IsNull ? Null : new
SqlMoney
(x.Value);
358
return x.IsNull ? SqlMoney.Null : new
SqlMoney
(x.Value);
365
return x.IsNull ? Null : new
SqlMoney
(decimal.Parse(x.Value, NumberStyles.Currency, null));
573
SqlMoney money = new
SqlMoney
(XmlConvert.ToDecimal(reader.ReadElementString()));
601
public static readonly SqlMoney Null = new
SqlMoney
(true);
607
public static readonly SqlMoney Zero = new
SqlMoney
(0);
615
public static readonly SqlMoney MinValue = new
SqlMoney
(unchecked((long)0x8000000000000000L), 0);
623
public static readonly SqlMoney MaxValue = new
SqlMoney
(0x7FFFFFFFFFFFFFFFL, 0);
147 references to SqlMoney
netstandard (1)
netstandard.cs (1)
586
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.
SqlMoney
))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
243
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.
SqlMoney
))]
System.Data.Common (145)
System\Data\ColumnTypeConverter.cs (1)
50
typeof(
SqlMoney
),
System\Data\Common\DataStorage.cs (1)
107
typeof(
SqlMoney
),
System\Data\Common\SQLConvert.cs (8)
124
StorageType.SqlMoney => (
SqlMoney
)value,
155
StorageType.SqlMoney => (
SqlMoney
)value,
185
StorageType.SqlMoney => (
SqlMoney
)value,
191
public static
SqlMoney
ConvertToSqlMoney(object value)
196
return
SqlMoney
.Null;
203
StorageType.SqlMoney => (
SqlMoney
)value,
216
_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(
SqlMoney
)),
681
return XmlConvert.ToString(((
SqlMoney
)value).Value);
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (20)
16
private
SqlMoney
[] _values = default!; // Late-initialized
19
: base(column, typeof(
SqlMoney
),
SqlMoney
.Null,
SqlMoney
.Null, StorageType.SqlMoney)
58
SqlMoney
mean = 0;
104
SqlMoney
min =
SqlMoney
.MaxValue;
110
if ((
SqlMoney
.LessThan(_values[record], min)).IsTrue)
121
SqlMoney
max =
SqlMoney
.MinValue;
127
if ((
SqlMoney
.GreaterThan(_values[record], max)).IsTrue)
156
throw ExprException.Overflow(typeof(
SqlMoney
));
169
return _values[recordNo].CompareTo((
SqlMoney
)value);
210
SqlMoney
newValue = default;
220
return ((
SqlMoney
)tmp);
228
Debug.Assert((value.GetType() == typeof(
SqlMoney
)), "wrong input type");
241
return new
SqlMoney
[recordCount];
246
SqlMoney
[] typedStore = (
SqlMoney
[])store;
253
_values = (
SqlMoney
[])store;
System\Data\Filter\UnaryNode.cs (1)
106
value = -(
SqlMoney
)vl;
System\Data\SQLTypes\SQLBoolean.cs (4)
272
public static explicit operator SqlBoolean(
SqlMoney
x)
274
return x.IsNull ? Null : (x !=
SqlMoney
.Zero);
413
public
SqlMoney
ToSqlMoney()
415
return (
SqlMoney
)this;
System\Data\SQLTypes\SQLByte.cs (2)
187
public static explicit operator SqlByte(
SqlMoney
x)
422
public
SqlMoney
ToSqlMoney()
System\Data\SQLTypes\SQLDecimal.cs (3)
1771
public static implicit operator SqlDecimal(
SqlMoney
x)
3001
public
SqlMoney
ToSqlMoney()
3003
return (
SqlMoney
)this;
System\Data\SQLTypes\SQLDouble.cs (3)
196
public static implicit operator SqlDouble(
SqlMoney
x)
340
public
SqlMoney
ToSqlMoney()
342
return (
SqlMoney
)this;
System\Data\SQLTypes\SQLInt16.cs (2)
252
public static explicit operator SqlInt16(
SqlMoney
x)
425
public
SqlMoney
ToSqlMoney()
System\Data\SQLTypes\SQLInt32.cs (2)
248
public static explicit operator SqlInt32(
SqlMoney
x)
440
public
SqlMoney
ToSqlMoney()
System\Data\SQLTypes\SQLInt64.cs (2)
290
public static explicit operator SqlInt64(
SqlMoney
x)
499
public
SqlMoney
ToSqlMoney()
System\Data\SQLTypes\SQLMoney.cs (88)
24
public struct SqlMoney : INullable, IComparable, IXmlSerializable, IEquatable<
SqlMoney
>
56
/// Initializes a new instance of the <see cref='
SqlMoney
'/> class with the value given.
65
/// Initializes a new instance of the <see cref='
SqlMoney
'/> class with the value given.
76
/// Initializes a new instance of the <see cref='
SqlMoney
'/> class with the value given.
99
/// Initializes a new instance of the <see cref='
SqlMoney
'/> class with the value given.
116
/// Gets or sets the monetary value of an instance of the <see cref='
SqlMoney
'/> class.
177
public static implicit operator
SqlMoney
(decimal x)
183
public static explicit operator
SqlMoney
(double x)
189
public static implicit operator
SqlMoney
(long x)
195
public static explicit operator decimal(
SqlMoney
x)
219
public static
SqlMoney
Parse(string s)
225
SqlMoney
money;
238
money =
SqlMoney
.Null;
252
public static
SqlMoney
FromTdsValue(long value)
258
public static
SqlMoney
operator -(
SqlMoney
x)
271
public static
SqlMoney
operator +(
SqlMoney
x,
SqlMoney
y)
283
public static
SqlMoney
operator -(
SqlMoney
x,
SqlMoney
y)
295
public static
SqlMoney
operator *(
SqlMoney
x,
SqlMoney
y)
301
public static
SqlMoney
operator /(
SqlMoney
x,
SqlMoney
y)
311
public static explicit operator
SqlMoney
(SqlBoolean x)
317
public static implicit operator
SqlMoney
(SqlByte x)
323
public static implicit operator
SqlMoney
(SqlInt16 x)
329
public static implicit operator
SqlMoney
(SqlInt32 x)
335
public static implicit operator
SqlMoney
(SqlInt64 x)
344
public static explicit operator
SqlMoney
(SqlSingle x)
350
public static explicit operator
SqlMoney
(SqlDouble x)
356
public static explicit operator
SqlMoney
(SqlDecimal x)
358
return x.IsNull ?
SqlMoney
.Null : new SqlMoney(x.Value);
363
public static explicit operator
SqlMoney
(SqlString x)
372
public static SqlBoolean operator ==(
SqlMoney
x,
SqlMoney
y)
377
public static SqlBoolean operator !=(
SqlMoney
x,
SqlMoney
y)
382
public static SqlBoolean operator <(
SqlMoney
x,
SqlMoney
y)
387
public static SqlBoolean operator >(
SqlMoney
x,
SqlMoney
y)
392
public static SqlBoolean operator <=(
SqlMoney
x,
SqlMoney
y)
397
public static SqlBoolean operator >=(
SqlMoney
x,
SqlMoney
y)
408
public static
SqlMoney
Add(
SqlMoney
x,
SqlMoney
y)
413
public static
SqlMoney
Subtract(
SqlMoney
x,
SqlMoney
y)
419
public static
SqlMoney
Multiply(
SqlMoney
x,
SqlMoney
y)
425
public static
SqlMoney
Divide(
SqlMoney
x,
SqlMoney
y)
431
public static SqlBoolean Equals(
SqlMoney
x,
SqlMoney
y)
437
public static SqlBoolean NotEquals(
SqlMoney
x,
SqlMoney
y)
443
public static SqlBoolean LessThan(
SqlMoney
x,
SqlMoney
y)
449
public static SqlBoolean GreaterThan(
SqlMoney
x,
SqlMoney
y)
455
public static SqlBoolean LessThanOrEqual(
SqlMoney
x,
SqlMoney
y)
461
public static SqlBoolean GreaterThanOrEqual(
SqlMoney
x,
SqlMoney
y)
523
if (value is
SqlMoney
i)
527
throw ADP.WrongType(value!.GetType(), typeof(
SqlMoney
));
530
public int CompareTo(
SqlMoney
value)
546
value is
SqlMoney
other && Equals(other);
551
public bool Equals(
SqlMoney
other) =>
573
SqlMoney
money = new SqlMoney(XmlConvert.ToDecimal(reader.ReadElementString()));
599
/// the <see cref='
SqlMoney
'/>class.
601
public static readonly
SqlMoney
Null = new SqlMoney(true);
605
/// the <see cref='
SqlMoney
'/> class.
607
public static readonly
SqlMoney
Zero = new SqlMoney(0);
612
/// the <see cref='
SqlMoney
'/>
615
public static readonly
SqlMoney
MinValue = new SqlMoney(unchecked((long)0x8000000000000000L), 0);
620
/// the <see cref='
SqlMoney
'/>
623
public static readonly
SqlMoney
MaxValue = new SqlMoney(0x7FFFFFFFFFFFFFFFL, 0);
System\Data\SQLTypes\SQLSingle.cs (3)
197
public static implicit operator SqlSingle(
SqlMoney
x)
354
public
SqlMoney
ToSqlMoney()
356
return (
SqlMoney
)this;
System\Data\SQLTypes\SQLString.cs (3)
506
public static explicit operator SqlString(
SqlMoney
x)
653
public
SqlMoney
ToSqlMoney()
655
return (
SqlMoney
)this;
System\Data\TypeLimiter.cs (1)
163
typeof(
SqlMoney
),
System\Data\xmlsaver.cs (1)
239
if (type == typeof(decimal) || type == typeof(SqlDecimal) || type == typeof(
SqlMoney
))