20 instantiations of SqlDateTime
System.Data (20)
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (4)
443
result = new
SqlDateTime
( temp );
1008
result = new
SqlDateTime
( GetDateTime_Unchecked( sink, getters, ordinal ) );
1041
result = new
SqlDateTime
( GetDateTime_Unchecked( sink, getters, ordinal ) );
1194
SqlDateTime dt = new
SqlDateTime
( GetDateTime_Unchecked( sink, getters, ordinal ) );
fx\src\data\System\Data\Common\SQLConvert.cs (1)
634
return new
SqlDateTime
(XmlConvert.ToDateTime((string)value, XmlDateTimeSerializationMode.RoundtripKind));
fx\src\data\System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (1)
123
SqlDateTime newValue = new
SqlDateTime
();
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (1)
508
return new
SqlDateTime
(_value._dateTimeInfo.daypart, _value._dateTimeInfo.timepart);
fx\src\data\System\Data\SqlClient\SqlEnums.cs (5)
522
sqlVal = new
SqlDateTime
((DateTime)comVal);
841
sqlDateTime = new
SqlDateTime
(dateTime);
848
sqlDateTime = new
SqlDateTime
(dateTime.AddSeconds(30));
858
return new
SqlDateTime
(sqlDays, sqlTime * SqlDateTime.SQLTicksPerMinute).Value;
862
return new
SqlDateTime
(sqlDays, sqlTime).Value;
fx\src\data\System\Data\SQLTypes\SQLDateTime.cs (8)
156
this = new
SqlDateTime
(dayticks, timeticks);
208
this = new
SqlDateTime
(day, time);
264
return new
SqlDateTime
(day, time);
330
return new
SqlDateTime
(value);
360
return new
SqlDateTime
(dt);
669
public static readonly SqlDateTime MinValue = new
SqlDateTime
(MinDay, 0);
670
public static readonly SqlDateTime MaxValue = new
SqlDateTime
(MaxDay, MaxTime);
672
public static readonly SqlDateTime Null = new
SqlDateTime
(true);
185 references to SqlDateTime
System.Data (155)
fx\src\data\Microsoft\SqlServer\Server\ITypedGetters.cs (1)
69
SqlDateTime
GetSqlDateTime( int ordinal );
fx\src\data\Microsoft\SqlServer\Server\ITypedSetters.cs (1)
68
void SetSqlDateTime( int ordinal,
SqlDateTime
value );
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (2)
117
ht.Add( typeof(
SqlDateTime
), ExtendedClrTypeCode.SqlDateTime );
265
else if (value.GetType() == typeof(
SqlDateTime
))
fx\src\data\Microsoft\SqlServer\Server\SmiRecordBuffer.cs (2)
332
public virtual
SqlDateTime
GetSqlDateTime( int ordinal ) {
685
public virtual void SetSqlDateTime( int ordinal,
SqlDateTime
value ) {
fx\src\data\Microsoft\SqlServer\Server\SmiRequestExecutor.cs (2)
390
public virtual
SqlDateTime
GetSqlDateTime( int ordinal ) {
743
public virtual void SetSqlDateTime( int ordinal,
SqlDateTime
value ) {
fx\src\data\Microsoft\SqlServer\Server\SqlDataRecord.cs (2)
333
public virtual
SqlDateTime
GetSqlDateTime(int ordinal) {
533
public virtual void SetSqlDateTime(int ordinal,
SqlDateTime
value) {
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (11)
435
internal static
SqlDateTime
GetSqlDateTime( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, SmiMetaData metaData ) {
436
SqlDateTime
result;
439
result =
SqlDateTime
.Null;
451
result = (
SqlDateTime
) obj;
1088
SqlDateTime
.Null, // SqlDbType.DateTime
1099
SqlDateTime
.Null, // SqlDbType.SmallDateTime
1194
SqlDateTime
dt = new SqlDateTime( GetDateTime_Unchecked( sink, getters, ordinal ) );
1486
internal static void SetSqlDateTime( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData,
SqlDateTime
value ) {
1619
case ExtendedClrTypeCode.SqlDateTime: SetSqlDateTime_Checked( sink, setters, ordinal, metaData, (
SqlDateTime
) value ); break;
2444
private static void SetSqlDateTime_Checked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData,
SqlDateTime
value) {
3478
private static void SetSqlDateTime_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal,
SqlDateTime
value ) {
fx\src\data\System\Data\ColumnTypeConverter.cs (1)
54
typeof(
SqlDateTime
),
fx\src\data\System\Data\Common\DataStorage.cs (1)
104
typeof(
SqlDateTime
),
fx\src\data\System\Data\Common\SQLConvert.cs (5)
293
public static
SqlDateTime
ConvertToSqlDateTime(object value) {
296
return
SqlDateTime
.Null;
303
return (
SqlDateTime
)value;
307
throw ExceptionBuilder.ConvertFailed(valueType, typeof(
SqlDateTime
));
723
return XmlConvert.ToString(((
SqlDateTime
)value).Value, XmlDateTimeSerializationMode.RoundtripKind);
fx\src\data\System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (21)
22
private
SqlDateTime
[] values;
25
: base(column, typeof(
SqlDateTime
),
SqlDateTime
.Null,
SqlDateTime
.Null, StorageType.SqlDateTime) {
33
SqlDateTime
min =
SqlDateTime
.MaxValue;
38
if ((
SqlDateTime
.LessThan(values[record], min)).IsTrue)
48
SqlDateTime
max =
SqlDateTime
.MinValue;
53
if ((
SqlDateTime
.GreaterThan(values[record], max)).IsTrue)
78
throw ExprException.Overflow(typeof(
SqlDateTime
));
88
return values[recordNo].CompareTo((
SqlDateTime
)value);
115
SqlDateTime
[] newValues = new
SqlDateTime
[capacity];
123
SqlDateTime
newValue = new SqlDateTime();
132
return ((
SqlDateTime
)tmp);
137
Debug.Assert((value.GetType() == typeof(
SqlDateTime
)), "wrong input type");
148
return new
SqlDateTime
[recordCount];
152
SqlDateTime
[] typedStore = (
SqlDateTime
[]) store;
158
values = (
SqlDateTime
[]) store;
fx\src\data\System\Data\Filter\BinaryNode.cs (16)
378
if (vLeft is TimeSpan && vRight is
SqlDateTime
) {
379
SqlDateTime
rValue = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime(vRight);
380
value = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime((DateTime)rValue.Value + (TimeSpan)vLeft);
382
else if (vLeft is
SqlDateTime
&& vRight is TimeSpan) {
383
SqlDateTime
lValue = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime(vLeft);
384
value = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime((DateTime)lValue.Value + (TimeSpan)vRight);
466
if (vLeft is TimeSpan && vRight is
SqlDateTime
) {
467
SqlDateTime
rValue = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime(vRight);
468
value = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime((DateTime)rValue.Value - (TimeSpan)vLeft);
470
else if (vLeft is
SqlDateTime
&& vRight is TimeSpan) {
471
SqlDateTime
lValue = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime(vLeft);
472
value = (
SqlDateTime
)SqlConvert.ConvertToSqlDateTime((DateTime)lValue.Value - (TimeSpan)vRight);
fx\src\data\System\Data\Sql\SqlMetaData.cs (5)
853
public
SqlDateTime
Adjust(
SqlDateTime
value) {
1082
else if (dataType == typeof(
SqlDateTime
))
1083
value = this.Adjust((
SqlDateTime
)value);
1211
else if (dataType == typeof(
SqlDateTime
))
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (5)
188
return
SqlDateTime
.ToDateTime(_value._dateTimeInfo.daypart, _value._dateTimeInfo.timepart);
502
internal
SqlDateTime
SqlDateTime {
506
return
SqlDateTime
.Null;
510
return (
SqlDateTime
)SqlValue; // anything else we haven't thought of goes through boxing.
744
case SqlBuffer.StorageType.DateTime: return typeof(
SqlDateTime
);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
2318
virtual public
SqlDateTime
GetSqlDateTime(int i) {
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (1)
773
public override
SqlDateTime
GetSqlDateTime(int ordinal) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (10)
314
else if (dataType == typeof(
SqlDateTime
))
400
else if (sqlType == typeof(
SqlDateTime
)) return
SqlDateTime
.Null;
452
else if (sqlVal is
SqlDateTime
)
453
comVal = ((
SqlDateTime
)sqlVal).Value;
791
(23, 3, 8, true, false, false, TdsEnums.SQLDATETIME, TdsEnums.SQLDATETIMN, MetaTypeName.DATETIME, typeof(System.DateTime), typeof(
SqlDateTime
), SqlDbType.DateTime, DbType.DateTime, 0);
794
(16, 0, 4, true, false, false, TdsEnums.SQLDATETIM4, TdsEnums.SQLDATETIMN, MetaTypeName.SMALLDATETIME, typeof(System.DateTime), typeof(
SqlDateTime
), SqlDbType.SmallDateTime, DbType.DateTime, 0);
835
SqlDateTime
sqlDateTime;
849
tdsDateTime.time = sqlDateTime.TimeTicks /
SqlDateTime
.SQLTicksPerMinute;
858
return new SqlDateTime(sqlDays, sqlTime *
SqlDateTime
.SQLTicksPerMinute).Value;
fx\src\data\System\Data\SqlClient\TdsParser.cs (8)
5153
value.SetToDateTime(daypartShort, timepartShort *
SqlDateTime
.SQLTicksPerMinute);
5582
value.SetToDateTime(daypartShort, timepartShort *
SqlDateTime
.SQLTicksPerMinute);
10070
SqlDateTime
dt = (
SqlDateTime
)value;
10077
WriteShort(dt.TimeTicks /
SqlDateTime
.SQLTicksPerMinute, stateObj);
11013
SqlDateTime
dt = (
SqlDateTime
)value;
11030
bPart = SerializeShort(dt.TimeTicks /
SqlDateTime
.SQLTicksPerMinute, stateObj);
fx\src\data\System\Data\SQLTypes\SQLDateTime.cs (56)
218
private static TimeSpan ToTimeSpan(
SqlDateTime
value) {
224
private static DateTime ToDateTime(
SqlDateTime
value) {
241
private static
SqlDateTime
FromTimeSpan(TimeSpan value) {
267
private static
SqlDateTime
FromDateTime(DateTime value) {
276
return
SqlDateTime
.MaxValue;
329
public static implicit operator
SqlDateTime
(DateTime value) {
334
public static explicit operator DateTime(
SqlDateTime
x) {
346
public static
SqlDateTime
Parse(String s) {
350
return
SqlDateTime
.Null;
369
public static
SqlDateTime
operator +(
SqlDateTime
x, TimeSpan t) {
374
public static
SqlDateTime
operator -(
SqlDateTime
x, TimeSpan t) {
383
public static
SqlDateTime
Add(
SqlDateTime
x, TimeSpan t) {
388
public static
SqlDateTime
Subtract(
SqlDateTime
x, TimeSpan t) {
470
public static explicit operator
SqlDateTime
(SqlString x) {
471
return x.IsNull ?
SqlDateTime
.Null :
SqlDateTime
.Parse(x.Value);
501
public static SqlBoolean operator==(
SqlDateTime
x,
SqlDateTime
y) {
505
public static SqlBoolean operator!=(
SqlDateTime
x,
SqlDateTime
y) {
509
public static SqlBoolean operator<(
SqlDateTime
x,
SqlDateTime
y) {
514
public static SqlBoolean operator>(
SqlDateTime
x,
SqlDateTime
y) {
519
public static SqlBoolean operator<=(
SqlDateTime
x,
SqlDateTime
y) {
524
public static SqlBoolean operator>=(
SqlDateTime
x,
SqlDateTime
y) {
534
public static SqlBoolean Equals(
SqlDateTime
x,
SqlDateTime
y) {
539
public static SqlBoolean NotEquals(
SqlDateTime
x,
SqlDateTime
y) {
544
public static SqlBoolean LessThan(
SqlDateTime
x,
SqlDateTime
y) {
549
public static SqlBoolean GreaterThan(
SqlDateTime
x,
SqlDateTime
y) {
554
public static SqlBoolean LessThanOrEqual(
SqlDateTime
x,
SqlDateTime
y) {
559
public static SqlBoolean GreaterThanOrEqual(
SqlDateTime
x,
SqlDateTime
y) {
577
if (value is
SqlDateTime
) {
578
SqlDateTime
i = (
SqlDateTime
)value;
582
throw ADP.WrongType(value.GetType(), typeof(
SqlDateTime
));
585
public int CompareTo(
SqlDateTime
value) {
600
if (!(value is
SqlDateTime
)) {
604
SqlDateTime
i = (
SqlDateTime
)value;
643
SqlDateTime
st = FromDateTime(dt);
669
public static readonly
SqlDateTime
MinValue = new SqlDateTime(MinDay, 0);
670
public static readonly
SqlDateTime
MaxValue = new SqlDateTime(MaxDay, MaxTime);
672
public static readonly
SqlDateTime
Null = new SqlDateTime(true);
fx\src\data\System\Data\SQLTypes\SQLString.cs (3)
582
public static explicit operator SqlString(
SqlDateTime
x) {
702
public
SqlDateTime
ToSqlDateTime() {
703
return (
SqlDateTime
)this;
fx\src\data\System\Data\xmlsaver.cs (1)
208
if (type == typeof(DateTime) || type == typeof(
SqlDateTime
) )
System.Workflow.Runtime (30)
Hosting\SqlPersistenceWorkflowInstanceDescription.cs (3)
33
private
SqlDateTime
nextTimerExpiration;
35
internal SqlPersistenceWorkflowInstanceDescription(Guid workflowInstanceId, WorkflowStatus status, bool isBlocked, string suspendOrTerminateDescription,
SqlDateTime
nextTimerExpiration)
48
public
SqlDateTime
NextTimerExpiration { get { return nextTimerExpiration; } }
Hosting\SqlWorkflowPersistenceService.cs (8)
41
public
SqlDateTime
NextTimer;
182
command.Parameters.Add(this.dbResourceAllocator.NewDbParameter("@ownedUntil", ownedUntil == DateTime.MaxValue ?
SqlDateTime
.MaxValue : ownedUntil));
258
command.Parameters.Add(this.dbResourceAllocator.NewDbParameter("@ownedUntil", ownedUntil == DateTime.MaxValue ?
SqlDateTime
.MaxValue : ownedUntil));
307
command.Parameters.Add(this.dbResourceAllocator.NewDbParameter("@ownedUntil", ownedUntil == DateTime.MaxValue ?
SqlDateTime
.MaxValue : ownedUntil));
372
command.Parameters.Add(this.dbResourceAllocator.NewDbParameter("@ownedUntil", ownedUntil == DateTime.MaxValue ?
SqlDateTime
.MaxValue : ownedUntil));
424
command.Parameters.Add(this.dbResourceAllocator.NewDbParameter("@ownedUntil", timeout == DateTime.MaxValue ?
SqlDateTime
.MaxValue : timeout));
657
(
SqlDateTime
)dr.GetDateTime(4)
1003
item.NextTimer = sub == null ?
SqlDateTime
.MaxValue : sub.ExpiresAt;
Tracking\SqlTrackingQuery.cs (4)
200
if (opt.StatusMinDateTime <
SqlDateTime
.MinValue.Value)
201
param.Value =
SqlDateTime
.MinValue.Value;
210
if (opt.StatusMaxDateTime >
SqlDateTime
.MaxValue.Value)
211
param.Value =
SqlDateTime
.MaxValue.Value;
Tracking\SqlTrackingWorkflowInstance.cs (15)
34
_actMinDT =
SqlDateTime
.MinValue.Value,
35
_userMinDT =
SqlDateTime
.MinValue.Value,
36
_instMinDT =
SqlDateTime
.MinValue.Value,
37
_childMinDT =
SqlDateTime
.MinValue.Value,
38
_changesMinDT =
SqlDateTime
.MinValue.Value,
39
_invMinDT =
SqlDateTime
.MinValue.Value;
213
DateTime tmpMin =
SqlDateTime
.MinValue.Value;
323
if (tmpMin >
SqlDateTime
.MinValue.Value)
349
DateTime tmpMin =
SqlDateTime
.MinValue.Value;
469
if (tmpMin >
SqlDateTime
.MinValue.Value)
490
DateTime tmpMin =
SqlDateTime
.MinValue.Value;
554
cmd.Parameters.Add(new SqlParameter("@BeginDateTime",
SqlDateTime
.MinValue.Value));
564
if (tmpMin >
SqlDateTime
.MinValue.Value)
785
DateTime tmpMin =
SqlDateTime
.MinValue.Value;
798
if (tmpMin >
SqlDateTime
.MinValue.Value)