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