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