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