39 instantiations of SqlMoney
System.Data (39)
fx\src\data\Microsoft\SqlServer\Server\SmiMetaData.cs (2)
80internal static readonly SqlMoney MaxSmallMoney = new SqlMoney( ( (Decimal)Int32.MaxValue ) / 10000 ); 81internal static readonly SqlMoney MinSmallMoney = new SqlMoney( ( (Decimal)Int32.MinValue ) / 10000 );
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (4)
1900SetSqlMoney_Checked(sink, setters, i, metaData[i], new SqlMoney(reader.GetDecimal(i))); 1926SetSqlMoney_Checked(sink, setters, i, metaData[i], new SqlMoney(reader.GetDecimal(i))); 2413SetSqlMoney_Checked( sink, setters, ordinal, metaData, new SqlMoney(value) ); 3166return new SqlMoney( temp, 1 /* ignored */ );
fx\src\data\System\Data\Common\SQLConvert.cs (1)
648return new SqlMoney(XmlConvert.ToDecimal((string)value));
fx\src\data\System\Data\Common\SQLTypes\SQLMoneyStorage.cs (1)
189SqlMoney newValue = new SqlMoney();
fx\src\data\System\Data\Sql\SqlMetaData.cs (3)
772VerifyMoneyRange(new SqlMoney(value)); 1454private static readonly SqlMoney x_smSmallMax = new SqlMoney(((Decimal)Int32.MaxValue)/10000); 1455private static readonly SqlMoney x_smSmallMin = new SqlMoney(((Decimal)Int32.MinValue)/10000);
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (1)
602return new SqlMoney(_value._int64, 1/*ignored*/);
fx\src\data\System\Data\SqlClient\TdsParser.cs (3)
5835mt = MetaType.GetMetaTypeFromValue(new SqlMoney((decimal)value)); 6186SqlMoney m = new SqlMoney(value); 6225SqlMoney m = new SqlMoney(value);
fx\src\data\System\Data\SQLTypes\SQLMoney.cs (24)
224return new SqlMoney(x); 229return new SqlMoney(x); 234return new SqlMoney(new Decimal(x)); 280money = new SqlMoney(d); 283money = new SqlMoney(Decimal.Parse(s, NumberStyles.Currency, NumberFormatInfo.CurrentInfo)); 298return new SqlMoney(-x.m_value, 0); 310return(x.IsNull || y.IsNull) ? Null : new SqlMoney(checked(x.m_value + y.m_value), 0); 322return(x.IsNull || y.IsNull) ? Null : new SqlMoney(checked(x.m_value - y.m_value), 0); 334 new SqlMoney(Decimal.Multiply(x.ToDecimal(), y.ToDecimal())); 342 new SqlMoney(Decimal.Divide(x.ToDecimal(), y.ToDecimal())); 353return x.IsNull ? Null : new SqlMoney((int)x.ByteValue); 361return x.IsNull ? Null : new SqlMoney((int)x.Value); 369return x.IsNull ? Null : new SqlMoney((int)x.Value); 377return x.IsNull ? Null : new SqlMoney(x.Value); 385return x.IsNull ? Null : new SqlMoney(x.Value); 396return x.IsNull ? Null : new SqlMoney((double)x.Value); 404return x.IsNull ? Null : new SqlMoney(x.Value); 412return x.IsNull ? SqlMoney.Null : new SqlMoney(x.Value); 421return x.IsNull ? Null : new SqlMoney(Decimal.Parse(x.Value,NumberStyles.Currency,null)); 637SqlMoney money = new SqlMoney(XmlConvert.ToDecimal(reader.ReadElementString())); 669public static readonly SqlMoney Null = new SqlMoney(true); 677public static readonly SqlMoney Zero = new SqlMoney(0); 687public static readonly SqlMoney MinValue = new SqlMoney(unchecked((long)0x8000000000000000L), 0); 697public static readonly SqlMoney MaxValue = new SqlMoney(0x7FFFFFFFFFFFFFFFL, 0);
206 references to SqlMoney
System.Data (206)
fx\src\data\Microsoft\SqlServer\Server\ITypedGetters.cs (1)
67SqlMoney GetSqlMoney( int ordinal );
fx\src\data\Microsoft\SqlServer\Server\ITypedSetters.cs (1)
66void SetSqlMoney( int ordinal, SqlMoney value );
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (2)
123ht.Add( typeof( SqlMoney ), ExtendedClrTypeCode.SqlMoney ); 296if (value.GetType() == typeof( SqlMoney ))
fx\src\data\Microsoft\SqlServer\Server\SmiMetaData.cs (2)
80internal static readonly SqlMoney MaxSmallMoney = new SqlMoney( ( (Decimal)Int32.MaxValue ) / 10000 ); 81internal static readonly SqlMoney MinSmallMoney = new SqlMoney( ( (Decimal)Int32.MinValue ) / 10000 );
fx\src\data\Microsoft\SqlServer\Server\SmiRecordBuffer.cs (2)
322public virtual SqlMoney GetSqlMoney( int ordinal ) { 675public virtual void SetSqlMoney( int ordinal, SqlMoney value ) {
fx\src\data\Microsoft\SqlServer\Server\SmiRequestExecutor.cs (2)
380public virtual SqlMoney GetSqlMoney( int ordinal ) { 733public virtual void SetSqlMoney( int ordinal, SqlMoney value ) {
fx\src\data\Microsoft\SqlServer\Server\SqlDataRecord.cs (2)
328public virtual SqlMoney GetSqlMoney(int ordinal) { 528public virtual void SetSqlMoney(int ordinal, SqlMoney value) {
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (11)
587internal static SqlMoney GetSqlMoney( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, SmiMetaData metaData ) { 588SqlMoney result; 591result = SqlMoney.Null; 602result = (SqlMoney) obj; 1093SqlMoney.Null, // SqlDbType.Money 1101SqlMoney.Null, // SqlDbType.SmallMoney 1528internal static void SetSqlMoney( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlMoney value ) { 1625case ExtendedClrTypeCode.SqlMoney: SetSqlMoney_Checked( sink, setters, ordinal, metaData, (SqlMoney) value ); break; 2463private static void SetSqlMoney_Checked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlMoney value) { 3161private static SqlMoney GetSqlMoney_Unchecked( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal ) { 3548private static void SetSqlMoney_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlMoney value ) {
fx\src\data\System\Data\ColumnTypeConverter.cs (1)
56typeof(SqlMoney),
fx\src\data\System\Data\Common\DataStorage.cs (1)
111typeof(SqlMoney),
fx\src\data\System\Data\Common\SQLConvert.cs (8)
158return (SqlMoney)value; 202return (SqlMoney)value; 244return (SqlMoney)value; 252public static SqlMoney ConvertToSqlMoney(object value) { 255return SqlMoney.Null; 262return (SqlMoney)value; 288throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlMoney)); 737return XmlConvert.ToString(((SqlMoney)value).Value);
fx\src\data\System\Data\Common\SQLTypes\SQLMoneyStorage.cs (22)
22private SqlMoney[] values; 25: base(column, typeof(SqlMoney), SqlMoney.Null, SqlMoney.Null, StorageType.SqlMoney) { 56SqlMoney mean = 0; 99SqlMoney min = SqlMoney.MaxValue; 104if ((SqlMoney.LessThan(values[record], min)).IsTrue) 114SqlMoney max = SqlMoney.MinValue; 119if ((SqlMoney.GreaterThan(values[record], max)).IsTrue) 144throw ExprException.Overflow(typeof(SqlMoney)); 154return values[recordNo].CompareTo((SqlMoney)value); 181SqlMoney[] newValues = new SqlMoney[capacity]; 189SqlMoney newValue = new SqlMoney(); 198return ((SqlMoney)tmp); 203Debug.Assert((value.GetType() == typeof(SqlMoney)), "wrong input type"); 214return new SqlMoney[recordCount]; 218SqlMoney[] typedStore = (SqlMoney[]) store; 224values = (SqlMoney[]) store;
fx\src\data\System\Data\Filter\UnaryNode.cs (1)
98value = -(SqlMoney) vl;
fx\src\data\System\Data\Sql\SqlMetaData.cs (8)
842public SqlMoney Adjust(SqlMoney value) { 1094else if (dataType == typeof(SqlMoney)) 1095value = this.Adjust((SqlMoney)value); 1223else if (dataType == typeof(SqlMoney)) 1454private static readonly SqlMoney x_smSmallMax = new SqlMoney(((Decimal)Int32.MaxValue)/10000); 1455private static readonly SqlMoney x_smSmallMin = new SqlMoney(((Decimal)Int32.MinValue)/10000); 1456void VerifyMoneyRange(SqlMoney value)
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (4)
596internal SqlMoney SqlMoney { 600return SqlMoney.Null; 604return (SqlMoney)this.SqlValue; // anything else we haven't thought of goes through boxing. 750case SqlBuffer.StorageType.Money: return typeof(SqlMoney);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
2353virtual public SqlMoney GetSqlMoney(int i) {
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (1)
768public override SqlMoney GetSqlMoney(int ordinal) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (7)
326else if (dataType == typeof(SqlMoney)) 401else if (sqlType == typeof(SqlMoney)) return SqlMoney.Null; 454else if (sqlVal is SqlMoney) 455comVal = ((SqlMoney)sqlVal).Value; 797(19, 255, 8, true, false, false, TdsEnums.SQLMONEY, TdsEnums.SQLMONEYN, MetaTypeName.MONEY, typeof(System.Decimal), typeof(SqlMoney), SqlDbType.Money, DbType.Currency, 0); 800(10, 255, 4, true, false, false, TdsEnums.SQLMONEY4, TdsEnums.SQLMONEYN, MetaTypeName.SMALLMONEY, typeof(System.Decimal), typeof(SqlMoney), SqlDbType.SmallMoney, DbType.Currency, 0);
fx\src\data\System\Data\SqlClient\TdsParser.cs (6)
6154private byte[] SerializeSqlMoney(SqlMoney value, int length, TdsParserStateObject stateObj) { 6158private void WriteSqlMoney(SqlMoney value, int length, TdsParserStateObject stateObj) { 6186SqlMoney m = new SqlMoney(value); 6225SqlMoney m = new SqlMoney(value); 10088WriteSqlMoney((SqlMoney)value, type.FixedLength, stateObj); 11054return SerializeSqlMoney((SqlMoney)value, type.FixedLength, stateObj);
fx\src\data\System\Data\SQLTypes\SQLBoolean.cs (4)
344public static explicit operator SqlBoolean(SqlMoney x) { 345return x.IsNull ? Null : (x != SqlMoney.Zero); 485public SqlMoney ToSqlMoney() { 486return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLByte.cs (3)
246public static explicit operator SqlByte(SqlMoney x) { 485public SqlMoney ToSqlMoney() { 486return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (3)
1743public static implicit operator SqlDecimal(SqlMoney x) { 2898public SqlMoney ToSqlMoney() { 2899return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLDouble.cs (3)
258public static implicit operator SqlDouble(SqlMoney x) { 405public SqlMoney ToSqlMoney() { 406return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLInt16.cs (3)
327public static explicit operator SqlInt16(SqlMoney x) { 494public SqlMoney ToSqlMoney() { 495return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLInt32.cs (3)
321public static explicit operator SqlInt32(SqlMoney x) { 506public SqlMoney ToSqlMoney() { 507return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLInt64.cs (3)
360public static explicit operator SqlInt64(SqlMoney x) { 561public SqlMoney ToSqlMoney() { 562return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLMoney.cs (94)
79/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlMoney'/> class with the value given. 89/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlMoney'/> class with the value given. 101/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlMoney'/> class with the value given. 125/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlMoney'/> class with the value given. 135/// Gets a value indicating whether the <see cref='System.Data.SqlTypes.SqlMoney.Value'/> 146/// Gets or sets the monetary value of an instance of the <see cref='System.Data.SqlTypes.SqlMoney'/> 223public static implicit operator SqlMoney(Decimal x) { 228public static explicit operator SqlMoney(double x) { 233public static implicit operator SqlMoney(long x) { 241public static explicit operator Decimal(SqlMoney x) { 260public static SqlMoney Parse(String s) { 265SqlMoney money; 277money = SqlMoney.Null; 293public static SqlMoney operator -(SqlMoney x) { 308public static SqlMoney operator +(SqlMoney x, SqlMoney y) { 320public static SqlMoney operator -(SqlMoney x, SqlMoney y) { 332public static SqlMoney operator *(SqlMoney x, SqlMoney y) { 340public static SqlMoney operator /(SqlMoney x, SqlMoney y) { 352public static explicit operator SqlMoney(SqlBoolean x) { 360public static implicit operator SqlMoney(SqlByte x) { 368public static implicit operator SqlMoney(SqlInt16 x) { 376public static implicit operator SqlMoney(SqlInt32 x) { 384public static implicit operator SqlMoney(SqlInt64 x) { 395public static explicit operator SqlMoney(SqlSingle x) { 403public static explicit operator SqlMoney(SqlDouble x) { 411public static explicit operator SqlMoney(SqlDecimal x) { 412return x.IsNull ? SqlMoney.Null : new SqlMoney(x.Value); 420public static explicit operator SqlMoney(SqlString x) { 431public static SqlBoolean operator==(SqlMoney x, SqlMoney y) { 438public static SqlBoolean operator!=(SqlMoney x, SqlMoney y) { 445public static SqlBoolean operator<(SqlMoney x, SqlMoney y) { 452public static SqlBoolean operator>(SqlMoney x, SqlMoney y) { 459public static SqlBoolean operator<=(SqlMoney x, SqlMoney y) { 466public static SqlBoolean operator>=(SqlMoney x, SqlMoney y) { 476public static SqlMoney Add(SqlMoney x, SqlMoney y) { 480public static SqlMoney Subtract(SqlMoney x, SqlMoney y) { 485public static SqlMoney Multiply(SqlMoney x, SqlMoney y) { 490public static SqlMoney Divide(SqlMoney x, SqlMoney y) { 495public static SqlBoolean Equals(SqlMoney x, SqlMoney y) { 500public static SqlBoolean NotEquals(SqlMoney x, SqlMoney y) { 505public static SqlBoolean LessThan(SqlMoney x, SqlMoney y) { 510public static SqlBoolean GreaterThan(SqlMoney x, SqlMoney y) { 515public static SqlBoolean LessThanOrEqual(SqlMoney x, SqlMoney y) { 520public static SqlBoolean GreaterThanOrEqual(SqlMoney x, SqlMoney y) { 574if (value is SqlMoney) { 575SqlMoney i = (SqlMoney)value; 579throw ADP.WrongType(value.GetType(), typeof(SqlMoney)); 582public int CompareTo(SqlMoney value) { 600if (!(value is SqlMoney)) { 604SqlMoney i = (SqlMoney)value; 637SqlMoney money = new SqlMoney(XmlConvert.ToDecimal(reader.ReadElementString())); 665/// the <see cref='System.Data.SqlTypes.SqlMoney.Value'/> property of an instance of 666/// the <see cref='System.Data.SqlTypes.SqlMoney'/>class. 669public static readonly SqlMoney Null = new SqlMoney(true); 673/// Represents the zero value that can be assigned to the <see cref='System.Data.SqlTypes.SqlMoney.Value'/> property of an instance of 674/// the <see cref='System.Data.SqlTypes.SqlMoney'/> class. 677public static readonly SqlMoney Zero = new SqlMoney(0); 682/// to <see cref='System.Data.SqlTypes.SqlMoney.Value'/> property of an instance of 683/// the <see cref='System.Data.SqlTypes.SqlMoney'/> 687public static readonly SqlMoney MinValue = new SqlMoney(unchecked((long)0x8000000000000000L), 0); 692/// the <see cref='System.Data.SqlTypes.SqlMoney.Value'/> property of an instance of 693/// the <see cref='System.Data.SqlTypes.SqlMoney'/> 697public static readonly SqlMoney MaxValue = new SqlMoney(0x7FFFFFFFFFFFFFFFL, 0);
fx\src\data\System\Data\SQLTypes\SQLSingle.cs (3)
256public static implicit operator SqlSingle(SqlMoney x) { 414public SqlMoney ToSqlMoney() { 415return (SqlMoney)this;
fx\src\data\System\Data\SQLTypes\SQLString.cs (3)
574public static explicit operator SqlString(SqlMoney x) { 722public SqlMoney ToSqlMoney() { 723return (SqlMoney)this;
fx\src\data\System\Data\xmlsaver.cs (1)
212if (type == typeof(Decimal)|| type == typeof(SqlDecimal) || type == typeof(SqlMoney))