25 instantiations of SqlInt16
System.Data.Common (25)
System\Data\Common\SQLConvert.cs (1)
587return new SqlInt16(XmlConvert.ToInt16((string)value));
System\Data\SQLTypes\SQLInt16.cs (24)
62return new SqlInt16(x); 81return new SqlInt16(short.Parse(s, null)); 87return x.IsNull ? Null : new SqlInt16((short)-x.m_value); 92return x.IsNull ? Null : new SqlInt16((short)~x.m_value); 107return new SqlInt16((short)iResult); 119return new SqlInt16((short)iResult); 132return new SqlInt16((short)iResult); 145return new SqlInt16((short)(x.m_value / y.m_value)); 161return new SqlInt16((short)(x.m_value % y.m_value)); 170return (x.IsNull || y.IsNull) ? Null : new SqlInt16((short)(x.m_value & y.m_value)); 175return (x.IsNull || y.IsNull) ? Null : new SqlInt16(unchecked((short)((ushort)x.m_value | (ushort)y.m_value))); 180return (x.IsNull || y.IsNull) ? Null : new SqlInt16((short)(x.m_value ^ y.m_value)); 188return x.IsNull ? Null : new SqlInt16(x.ByteValue); 194return x.IsNull ? Null : new SqlInt16(x.Value); 209return new SqlInt16((short)value); 222return new SqlInt16((short)value); 235return new SqlInt16((short)value); 248return new SqlInt16((short)value); 254return x.IsNull ? Null : new SqlInt16(checked((short)x.ToInt32())); 266return x.IsNull ? Null : new SqlInt16(short.Parse(x.Value, null)); 524public static readonly SqlInt16 Null = new SqlInt16(true); 525public static readonly SqlInt16 Zero = new SqlInt16(0); 526public static readonly SqlInt16 MinValue = new SqlInt16(short.MinValue); 527public static readonly SqlInt16 MaxValue = new SqlInt16(short.MaxValue);
170 references to SqlInt16
netstandard (1)
netstandard.cs (1)
583[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlInt16))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
240[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlInt16))]
System.Data.Common (168)
System\Data\ColumnTypeConverter.cs (1)
38typeof(SqlInt16),
System\Data\Common\DataStorage.cs (1)
104typeof(SqlInt16),
System\Data\Common\SQLConvert.cs (11)
30public static SqlInt16 ConvertToSqlInt16(object value) 35return SqlInt16.Null; 44StorageType.SqlInt16 => (SqlInt16)value, 45_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlInt16)), 62StorageType.SqlInt16 => (SqlInt16)value, 85StorageType.SqlInt16 => (SqlInt16)value, 114StorageType.SqlInt16 => (SqlInt16)value, 147StorageType.SqlInt16 => (SqlInt16)value, 177StorageType.SqlInt16 => (SqlInt16)value, 208StorageType.SqlInt16 => (SqlInt16)value, 675return XmlConvert.ToString(((SqlInt16)value).Value);
System\Data\Common\SQLTypes\SQLInt16Storage.cs (20)
16private SqlInt16[] _values = default!; // Late-initialized 19: base(column, typeof(SqlInt16), SqlInt16.Null, SqlInt16.Null, StorageType.SqlInt16) 58SqlInt16 mean = 0; 104SqlInt16 min = SqlInt16.MaxValue; 110if ((SqlInt16.LessThan(_values[record], min)).IsTrue) 121SqlInt16 max = SqlInt16.MinValue; 127if ((SqlInt16.GreaterThan(_values[record], max)).IsTrue) 156throw ExprException.Overflow(typeof(SqlInt16)); 169return _values[recordNo].CompareTo((SqlInt16)value); 209SqlInt16 newValue = default; 219return ((SqlInt16)tmp); 226Debug.Assert((value.GetType() == typeof(SqlInt16)), "wrong input type"); 239return new SqlInt16[recordCount]; 244SqlInt16[] typedStore = (SqlInt16[])store; 251_values = (SqlInt16[])store;
System\Data\DataColumn.cs (1)
1618dataType == typeof(SqlInt16) ||
System\Data\Filter\UnaryNode.cs (1)
115value = -(SqlInt16)vl;
System\Data\SQLTypes\SQLBoolean.cs (3)
242public static explicit operator SqlBoolean(SqlInt16 x) 398public SqlInt16 ToSqlInt16() 400return (SqlInt16)this;
System\Data\SQLTypes\SQLByte.cs (2)
193public static explicit operator SqlByte(SqlInt16 x) 407public SqlInt16 ToSqlInt16()
System\Data\SQLTypes\SQLDecimal.cs (3)
1753public static implicit operator SqlDecimal(SqlInt16 x) 2986public SqlInt16 ToSqlInt16() 2988return (SqlInt16)this;
System\Data\SQLTypes\SQLDouble.cs (3)
172public static implicit operator SqlDouble(SqlInt16 x) 325public SqlInt16 ToSqlInt16() 327return (SqlInt16)this;
System\Data\SQLTypes\SQLInt16.cs (105)
20public struct SqlInt16 : INullable, IComparable, IXmlSerializable, IEquatable<SqlInt16> 60public static implicit operator SqlInt16(short x) 66public static explicit operator short(SqlInt16 x) 76public static SqlInt16 Parse(string s) 79return SqlInt16.Null; 85public static SqlInt16 operator -(SqlInt16 x) 90public static SqlInt16 operator ~(SqlInt16 x) 98public static SqlInt16 operator +(SqlInt16 x, SqlInt16 y) 110public static SqlInt16 operator -(SqlInt16 x, SqlInt16 y) 122public static SqlInt16 operator *(SqlInt16 x, SqlInt16 y) 135public static SqlInt16 operator /(SqlInt16 x, SqlInt16 y) 151public static SqlInt16 operator %(SqlInt16 x, SqlInt16 y) 168public static SqlInt16 operator &(SqlInt16 x, SqlInt16 y) 173public static SqlInt16 operator |(SqlInt16 x, SqlInt16 y) 178public static SqlInt16 operator ^(SqlInt16 x, SqlInt16 y) 186public static explicit operator SqlInt16(SqlBoolean x) 192public static implicit operator SqlInt16(SqlByte x) 200public static explicit operator SqlInt16(SqlInt32 x) 213public static explicit operator SqlInt16(SqlInt64 x) 226public static explicit operator SqlInt16(SqlSingle x) 239public static explicit operator SqlInt16(SqlDouble x) 252public static explicit operator SqlInt16(SqlMoney x) 258public static explicit operator SqlInt16(SqlDecimal x) 260return (SqlInt16)(SqlInt32)x; 264public static explicit operator SqlInt16(SqlString x) 270public static SqlBoolean operator ==(SqlInt16 x, SqlInt16 y) 275public static SqlBoolean operator !=(SqlInt16 x, SqlInt16 y) 280public static SqlBoolean operator <(SqlInt16 x, SqlInt16 y) 285public static SqlBoolean operator >(SqlInt16 x, SqlInt16 y) 290public static SqlBoolean operator <=(SqlInt16 x, SqlInt16 y) 295public static SqlBoolean operator >=(SqlInt16 x, SqlInt16 y) 305public static SqlInt16 OnesComplement(SqlInt16 x) 311public static SqlInt16 Add(SqlInt16 x, SqlInt16 y) 316public static SqlInt16 Subtract(SqlInt16 x, SqlInt16 y) 322public static SqlInt16 Multiply(SqlInt16 x, SqlInt16 y) 328public static SqlInt16 Divide(SqlInt16 x, SqlInt16 y) 334public static SqlInt16 Mod(SqlInt16 x, SqlInt16 y) 339public static SqlInt16 Modulus(SqlInt16 x, SqlInt16 y) 345public static SqlInt16 BitwiseAnd(SqlInt16 x, SqlInt16 y) 351public static SqlInt16 BitwiseOr(SqlInt16 x, SqlInt16 y) 357public static SqlInt16 Xor(SqlInt16 x, SqlInt16 y) 363public static SqlBoolean Equals(SqlInt16 x, SqlInt16 y) 369public static SqlBoolean NotEquals(SqlInt16 x, SqlInt16 y) 375public static SqlBoolean LessThan(SqlInt16 x, SqlInt16 y) 381public static SqlBoolean GreaterThan(SqlInt16 x, SqlInt16 y) 387public static SqlBoolean LessThanOrEqual(SqlInt16 x, SqlInt16 y) 393public static SqlBoolean GreaterThanOrEqual(SqlInt16 x, SqlInt16 y) 454if (value is SqlInt16 i) 458throw ADP.WrongType(value!.GetType(), typeof(SqlInt16)); 461public int CompareTo(SqlInt16 value) 477value is SqlInt16 other && Equals(other); 482public bool Equals(SqlInt16 other) => 524public static readonly SqlInt16 Null = new SqlInt16(true); 525public static readonly SqlInt16 Zero = new SqlInt16(0); 526public static readonly SqlInt16 MinValue = new SqlInt16(short.MinValue); 527public static readonly SqlInt16 MaxValue = new SqlInt16(short.MaxValue);
System\Data\SQLTypes\SQLInt32.cs (3)
201public static implicit operator SqlInt32(SqlInt16 x) 430public SqlInt16 ToSqlInt16() 432return (SqlInt16)this;
System\Data\SQLTypes\SQLInt64.cs (3)
250public static implicit operator SqlInt64(SqlInt16 x) 489public SqlInt16 ToSqlInt16() 491return (SqlInt16)this;
System\Data\SQLTypes\SQLMoney.cs (3)
323public static implicit operator SqlMoney(SqlInt16 x) 483public SqlInt16 ToSqlInt16() 485return (SqlInt16)this;
System\Data\SQLTypes\SQLSingle.cs (3)
176public static implicit operator SqlSingle(SqlInt16 x) 339public SqlInt16 ToSqlInt16() 341return (SqlInt16)this;
System\Data\SQLTypes\SQLString.cs (3)
470public static explicit operator SqlString(SqlInt16 x) 638public SqlInt16 ToSqlInt16() 640return (SqlInt16)this;
System\Data\TypeLimiter.cs (1)
160typeof(SqlInt16),
System\Data\xmlsaver.cs (1)
253if (type == typeof(short) || type == typeof(SqlInt16))