Class WorkTimeDetail
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
The times during the week that are working times.
public class WorkTimeDetail : Entity, IEntity, IComparable, IIdentifiable
- Inheritance
-
WorkTimeDetail
- Implements
- Inherited Members
Constructors
WorkTimeDetail()
Initializes a new instance of the WorkTimeDetail class. Initializes a new instance of the WorkTimeDetail class.
public WorkTimeDetail()
WorkTimeDetail(Id?, DayOfWeek?, in TimeSpan?, in TimeSpan?)
Initializes a new instance of the WorkTimeDetail class. Initializes a new instance of the WorkTimeDetail class.
public WorkTimeDetail(Id? id, DayOfWeek? day, in TimeSpan? from, in TimeSpan? to)
Parameters
Exceptions
- ArgumentException
From must be less than to.
WorkTimeDetail(WorkTimeDetail)
Initializes a new instance of the WorkTimeDetail class. Copy constructor - initializes a new instance of the WorkTimeDetail class.
protected WorkTimeDetail(WorkTimeDetail workTimes)
Parameters
workTimes
WorkTimeDetailThe work times.
Fields
MaxValue
public const int MaxValue = 86399999
Field Value
MinValue
public const int MinValue = 0
Field Value
Properties
DayOfWeek
Gets the day of the week; with Sunday being 0, Monday being 1, etc..
public DayOfWeek? DayOfWeek { get; }
Property Value
FromTime
Gets the timeSpan since the start of the period.
public TimeSpan? FromTime { get; }
Property Value
ToTime
Gets the timeSpan to the end of the period.
public TimeSpan? ToTime { get; }
Property Value
Methods
CheckTimesNotNull()
Throws if WorkTimeDetail FromTime or ToTime is null.
public void CheckTimesNotNull()
CheckTimesNotNull(WorkTimeDetail, WorkTimeDetail)
Throws if either WorkTimeDetail's FromTime or ToTime is null.
public static void CheckTimesNotNull(WorkTimeDetail w1, WorkTimeDetail w2)
Parameters
w1
WorkTimeDetailThe first WorkTimeDetail
w2
WorkTimeDetailThe second WorkTimeDetail
Clone()
Creates a new object that is a copy of the current instance.
public override IEntity Clone()
Returns
- IEntity
A new object that is a copy of this instance.