9 instantiations of SqlDateTime
System.Data.Common (9)
System\Data\Common\SQLConvert.cs (1)
579
return new
SqlDateTime
(XmlConvert.ToDateTime((string)value, XmlDateTimeSerializationMode.RoundtripKind));
System\Data\SQLTypes\SQLDateTime.cs (8)
130
this = new
SqlDateTime
(dayticks, timeticks);
187
this = new
SqlDateTime
(day, time);
249
return new
SqlDateTime
(day, time);
323
return new
SqlDateTime
(value);
358
return new
SqlDateTime
(dt);
677
public static readonly SqlDateTime MinValue = new
SqlDateTime
(s_minDay, 0);
678
public static readonly SqlDateTime MaxValue = new
SqlDateTime
(s_maxDay, s_maxTime);
680
public static readonly SqlDateTime Null = new
SqlDateTime
(true);
95 references to SqlDateTime
netstandard (1)
netstandard.cs (1)
579
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.
SqlDateTime
))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
235
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.
SqlDateTime
))]
System.Data.Common (93)
System\Data\ColumnTypeConverter.cs (1)
48
typeof(
SqlDateTime
),
System\Data\Common\DataStorage.cs (1)
100
typeof(
SqlDateTime
),
System\Data\Common\SQLConvert.cs (5)
221
public static
SqlDateTime
ConvertToSqlDateTime(object value)
226
return
SqlDateTime
.Null;
233
StorageType.SqlDateTime => (
SqlDateTime
)value,
235
_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(
SqlDateTime
)),
667
return XmlConvert.ToString(((
SqlDateTime
)value).Value, XmlDateTimeSerializationMode.RoundtripKind);
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (19)
16
private
SqlDateTime
[] _values = default!; // Late-initialized
19
: base(column, typeof(
SqlDateTime
),
SqlDateTime
.Null,
SqlDateTime
.Null, StorageType.SqlDateTime)
31
SqlDateTime
min =
SqlDateTime
.MaxValue;
37
if ((
SqlDateTime
.LessThan(_values[record], min)).IsTrue)
48
SqlDateTime
max =
SqlDateTime
.MinValue;
54
if ((
SqlDateTime
.GreaterThan(_values[record], max)).IsTrue)
83
throw ExprException.Overflow(typeof(
SqlDateTime
));
96
return _values[recordNo].CompareTo((
SqlDateTime
)value);
137
SqlDateTime
newValue = default;
147
return ((
SqlDateTime
)tmp);
155
Debug.Assert((value.GetType() == typeof(
SqlDateTime
)), "wrong input type");
168
return new
SqlDateTime
[recordCount];
173
SqlDateTime
[] typedStore = (
SqlDateTime
[])store;
180
_values = (
SqlDateTime
[])store;
System\Data\Filter\BinaryNode.cs (8)
485
if (vLeft is TimeSpan && vRight is
SqlDateTime
)
487
SqlDateTime
rValue = SqlConvert.ConvertToSqlDateTime(vRight);
490
else if (vLeft is
SqlDateTime
&& vRight is TimeSpan)
492
SqlDateTime
lValue = SqlConvert.ConvertToSqlDateTime(vLeft);
624
if (vLeft is TimeSpan && vRight is
SqlDateTime
)
626
SqlDateTime
rValue = SqlConvert.ConvertToSqlDateTime(vRight);
629
else if (vLeft is
SqlDateTime
&& vRight is TimeSpan)
631
SqlDateTime
lValue = SqlConvert.ConvertToSqlDateTime(vLeft);
System\Data\SQLTypes\SQLDateTime.cs (54)
24
public struct SqlDateTime : INullable, IComparable, IXmlSerializable, IEquatable<
SqlDateTime
>
196
private static TimeSpan ToTimeSpan(
SqlDateTime
value)
203
private static DateTime ToDateTime(
SqlDateTime
value)
223
private static
SqlDateTime
FromTimeSpan(TimeSpan value)
252
private static
SqlDateTime
FromDateTime(DateTime value)
262
return
SqlDateTime
.MaxValue;
321
public static implicit operator
SqlDateTime
(DateTime value)
327
public static explicit operator DateTime(
SqlDateTime
x)
341
public static
SqlDateTime
Parse(string s)
346
return
SqlDateTime
.Null;
367
public static
SqlDateTime
operator +(
SqlDateTime
x, TimeSpan t)
373
public static
SqlDateTime
operator -(
SqlDateTime
x, TimeSpan t)
383
public static
SqlDateTime
Add(
SqlDateTime
x, TimeSpan t)
389
public static
SqlDateTime
Subtract(
SqlDateTime
x, TimeSpan t)
472
public static explicit operator
SqlDateTime
(SqlString x)
474
return x.IsNull ?
SqlDateTime
.Null :
SqlDateTime
.Parse(x.Value);
505
public static SqlBoolean operator ==(
SqlDateTime
x,
SqlDateTime
y)
510
public static SqlBoolean operator !=(
SqlDateTime
x,
SqlDateTime
y)
515
public static SqlBoolean operator <(
SqlDateTime
x,
SqlDateTime
y)
521
public static SqlBoolean operator >(
SqlDateTime
x,
SqlDateTime
y)
527
public static SqlBoolean operator <=(
SqlDateTime
x,
SqlDateTime
y)
533
public static SqlBoolean operator >=(
SqlDateTime
x,
SqlDateTime
y)
544
public static SqlBoolean Equals(
SqlDateTime
x,
SqlDateTime
y)
550
public static SqlBoolean NotEquals(
SqlDateTime
x,
SqlDateTime
y)
556
public static SqlBoolean LessThan(
SqlDateTime
x,
SqlDateTime
y)
562
public static SqlBoolean GreaterThan(
SqlDateTime
x,
SqlDateTime
y)
568
public static SqlBoolean LessThanOrEqual(
SqlDateTime
x,
SqlDateTime
y)
574
public static SqlBoolean GreaterThanOrEqual(
SqlDateTime
x,
SqlDateTime
y)
595
if (value is
SqlDateTime
i)
599
throw ADP.WrongType(value!.GetType(), typeof(
SqlDateTime
));
602
public int CompareTo(
SqlDateTime
value)
618
value is
SqlDateTime
other && Equals(other);
623
public bool Equals(
SqlDateTime
other) =>
653
SqlDateTime
st = FromDateTime(dt);
677
public static readonly
SqlDateTime
MinValue = new SqlDateTime(s_minDay, 0);
678
public static readonly
SqlDateTime
MaxValue = new SqlDateTime(s_maxDay, s_maxTime);
680
public static readonly
SqlDateTime
Null = new SqlDateTime(true);
System\Data\SQLTypes\SQLString.cs (3)
512
public static explicit operator SqlString(
SqlDateTime
x)
628
public
SqlDateTime
ToSqlDateTime()
630
return (
SqlDateTime
)this;
System\Data\TypeLimiter.cs (1)
156
typeof(
SqlDateTime
),
System\Data\xmlsaver.cs (1)
235
if (type == typeof(DateTime) || type == typeof(
SqlDateTime
))