28 instantiations of SqlInt32
System.Data.Common (28)
System\Data\Common\SQLConvert.cs (1)
589return new SqlInt32(XmlConvert.ToInt32((string)value));
System\Data\SQLTypes\SQLDecimal.cs (2)
3157(n.IsPositive ? new SqlInt32(1) : new SqlInt32(-1));
System\Data\SQLTypes\SQLInt32.cs (25)
63return new SqlInt32(x); 82return new SqlInt32(int.Parse(s, null)); 89return x.IsNull ? Null : new SqlInt32(-x.m_value); 94return x.IsNull ? Null : new SqlInt32(~x.m_value); 109return new SqlInt32(iResult); 121return new SqlInt32(iResult); 134return new SqlInt32((int)lResult); 147return new SqlInt32(x.m_value / y.m_value); 163return new SqlInt32(x.m_value % y.m_value); 172return (x.IsNull || y.IsNull) ? Null : new SqlInt32(x.m_value & y.m_value); 177return (x.IsNull || y.IsNull) ? Null : new SqlInt32(x.m_value | y.m_value); 182return (x.IsNull || y.IsNull) ? Null : new SqlInt32(x.m_value ^ y.m_value); 191return x.IsNull ? Null : new SqlInt32(x.ByteValue); 197return x.IsNull ? Null : new SqlInt32(x.Value); 203return x.IsNull ? Null : new SqlInt32(x.Value); 218return new SqlInt32((int)value); 231return new SqlInt32((int)value); 244return new SqlInt32((int)value); 250return x.IsNull ? Null : new SqlInt32(x.ToInt32()); 268return new SqlInt32((int)ret); 275return x.IsNull ? SqlInt32.Null : new SqlInt32(int.Parse(x.Value, null)); 539public static readonly SqlInt32 Null = new SqlInt32(true); 540public static readonly SqlInt32 Zero = new SqlInt32(0); 541public static readonly SqlInt32 MinValue = new SqlInt32(int.MinValue); 542public static readonly SqlInt32 MaxValue = new SqlInt32(int.MaxValue);
176 references to SqlInt32
netstandard (1)
netstandard.cs (1)
584[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlInt32))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
241[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlInt32))]
System.Data.Common (174)
System\Data\ColumnTypeConverter.cs (1)
39typeof(SqlInt32),
System\Data\Common\DataStorage.cs (1)
105typeof(SqlInt32),
System\Data\Common\SQLConvert.cs (11)
49public static SqlInt32 ConvertToSqlInt32(object value) 54return SqlInt32.Null; 60StorageType.SqlInt32 => (SqlInt32)value, 68_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlInt32)), 77return SqlInt32.Null; 88StorageType.SqlInt32 => (SqlInt32)value, 117StorageType.SqlInt32 => (SqlInt32)value, 150StorageType.SqlInt32 => (SqlInt32)value, 180StorageType.SqlInt32 => (SqlInt32)value, 211StorageType.SqlInt32 => (SqlInt32)value, 677return XmlConvert.ToString(((SqlInt32)value).Value);
System\Data\Common\SQLTypes\SQLInt32Storage.cs (20)
16private SqlInt32[] _values = default!; // Late-initialized 19: base(column, typeof(SqlInt32), SqlInt32.Null, SqlInt32.Null, StorageType.SqlInt32) 58SqlInt32 mean = 0; 104SqlInt32 min = SqlInt32.MaxValue; 110if ((SqlInt32.LessThan(_values[record], min)).IsTrue) 121SqlInt32 max = SqlInt32.MinValue; 127if ((SqlInt32.GreaterThan(_values[record], max)).IsTrue) 156throw ExprException.Overflow(typeof(SqlInt32)); 169return _values[recordNo].CompareTo((SqlInt32)value); 210SqlInt32 newValue = default; 220return ((SqlInt32)tmp); 228Debug.Assert((value.GetType() == typeof(SqlInt32)), "wrong input type"); 241return new SqlInt32[recordCount]; 246SqlInt32[] typedStore = (SqlInt32[])store; 253_values = (SqlInt32[])store;
System\Data\DataColumn.cs (1)
1617dataType == typeof(SqlInt32) ||
System\Data\Filter\UnaryNode.cs (1)
112value = -(SqlInt32)vl;
System\Data\SQLTypes\SQLBoolean.cs (3)
248public static explicit operator SqlBoolean(SqlInt32 x) 403public SqlInt32 ToSqlInt32() 405return (SqlInt32)this;
System\Data\SQLTypes\SQLByte.cs (3)
205public static explicit operator SqlByte(SqlInt32 x) 255return (SqlByte)(SqlInt32)x; 412public SqlInt32 ToSqlInt32()
System\Data\SQLTypes\SQLDecimal.cs (7)
1759public static implicit operator SqlDecimal(SqlInt32 x) 2991public SqlInt32 ToSqlInt32() 2993return (SqlInt32)this; 3146public static SqlInt32 Sign(SqlDecimal n) 3151return SqlInt32.Null; 3154return SqlInt32.Zero; 3156return n.IsNull ? SqlInt32.Null :
System\Data\SQLTypes\SQLDouble.cs (3)
178public static implicit operator SqlDouble(SqlInt32 x) 330public SqlInt32 ToSqlInt32() 332return (SqlInt32)this;
System\Data\SQLTypes\SQLInt16.cs (3)
200public static explicit operator SqlInt16(SqlInt32 x) 260return (SqlInt16)(SqlInt32)x; 415public SqlInt32 ToSqlInt32()
System\Data\SQLTypes\SQLInt32.cs (106)
20public struct SqlInt32 : INullable, IComparable, IXmlSerializable, IEquatable<SqlInt32> 61public static implicit operator SqlInt32(int x) 67public static explicit operator int(SqlInt32 x) 77public static SqlInt32 Parse(string s) 80return SqlInt32.Null; 87public static SqlInt32 operator -(SqlInt32 x) 92public static SqlInt32 operator ~(SqlInt32 x) 100public static SqlInt32 operator +(SqlInt32 x, SqlInt32 y) 112public static SqlInt32 operator -(SqlInt32 x, SqlInt32 y) 124public static SqlInt32 operator *(SqlInt32 x, SqlInt32 y) 137public static SqlInt32 operator /(SqlInt32 x, SqlInt32 y) 153public static SqlInt32 operator %(SqlInt32 x, SqlInt32 y) 170public static SqlInt32 operator &(SqlInt32 x, SqlInt32 y) 175public static SqlInt32 operator |(SqlInt32 x, SqlInt32 y) 180public static SqlInt32 operator ^(SqlInt32 x, SqlInt32 y) 189public static explicit operator SqlInt32(SqlBoolean x) 195public static implicit operator SqlInt32(SqlByte x) 201public static implicit operator SqlInt32(SqlInt16 x) 209public static explicit operator SqlInt32(SqlInt64 x) 222public static explicit operator SqlInt32(SqlSingle x) 235public static explicit operator SqlInt32(SqlDouble x) 248public static explicit operator SqlInt32(SqlMoney x) 254public static explicit operator SqlInt32(SqlDecimal x) 257return SqlInt32.Null; 273public static explicit operator SqlInt32(SqlString x) 275return x.IsNull ? SqlInt32.Null : new SqlInt32(int.Parse(x.Value, null)); 285public static SqlBoolean operator ==(SqlInt32 x, SqlInt32 y) 290public static SqlBoolean operator !=(SqlInt32 x, SqlInt32 y) 295public static SqlBoolean operator <(SqlInt32 x, SqlInt32 y) 300public static SqlBoolean operator >(SqlInt32 x, SqlInt32 y) 305public static SqlBoolean operator <=(SqlInt32 x, SqlInt32 y) 310public static SqlBoolean operator >=(SqlInt32 x, SqlInt32 y) 320public static SqlInt32 OnesComplement(SqlInt32 x) 326public static SqlInt32 Add(SqlInt32 x, SqlInt32 y) 331public static SqlInt32 Subtract(SqlInt32 x, SqlInt32 y) 337public static SqlInt32 Multiply(SqlInt32 x, SqlInt32 y) 343public static SqlInt32 Divide(SqlInt32 x, SqlInt32 y) 349public static SqlInt32 Mod(SqlInt32 x, SqlInt32 y) 354public static SqlInt32 Modulus(SqlInt32 x, SqlInt32 y) 360public static SqlInt32 BitwiseAnd(SqlInt32 x, SqlInt32 y) 366public static SqlInt32 BitwiseOr(SqlInt32 x, SqlInt32 y) 372public static SqlInt32 Xor(SqlInt32 x, SqlInt32 y) 378public static SqlBoolean Equals(SqlInt32 x, SqlInt32 y) 384public static SqlBoolean NotEquals(SqlInt32 x, SqlInt32 y) 390public static SqlBoolean LessThan(SqlInt32 x, SqlInt32 y) 396public static SqlBoolean GreaterThan(SqlInt32 x, SqlInt32 y) 402public static SqlBoolean LessThanOrEqual(SqlInt32 x, SqlInt32 y) 408public static SqlBoolean GreaterThanOrEqual(SqlInt32 x, SqlInt32 y) 469if (value is SqlInt32 i) 473throw ADP.WrongType(value!.GetType(), typeof(SqlInt32)); 476public int CompareTo(SqlInt32 value) 492value is SqlInt32 other && Equals(other); 497public bool Equals(SqlInt32 other) => 539public static readonly SqlInt32 Null = new SqlInt32(true); 540public static readonly SqlInt32 Zero = new SqlInt32(0); 541public static readonly SqlInt32 MinValue = new SqlInt32(int.MinValue); 542public static readonly SqlInt32 MaxValue = new SqlInt32(int.MaxValue);
System\Data\SQLTypes\SQLInt64.cs (3)
256public static implicit operator SqlInt64(SqlInt32 x) 494public SqlInt32 ToSqlInt32() 496return (SqlInt32)this;
System\Data\SQLTypes\SQLMoney.cs (3)
329public static implicit operator SqlMoney(SqlInt32 x) 488public SqlInt32 ToSqlInt32() 490return (SqlInt32)this;
System\Data\SQLTypes\SQLSingle.cs (3)
183public static implicit operator SqlSingle(SqlInt32 x) 344public SqlInt32 ToSqlInt32() 346return (SqlInt32)this;
System\Data\SQLTypes\SQLString.cs (3)
476public static explicit operator SqlString(SqlInt32 x) 643public SqlInt32 ToSqlInt32() 645return (SqlInt32)this;
System\Data\TypeLimiter.cs (1)
161typeof(SqlInt32),
System\Data\xmlsaver.cs (1)
255if (type == typeof(int) || type == typeof(SqlInt32))