Table of Contents

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

id Id

The identifier.

day DayOfWeek?

The day.

from TimeSpan?

From.

to TimeSpan?

To.

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 WorkTimeDetail

The work times.

Fields

MaxValue

false

public const int MaxValue = 86399999

Field Value

int

MinValue

false

public const int MinValue = 0

Field Value

int

Properties

DayOfWeek

Gets the day of the week; with Sunday being 0, Monday being 1, etc..

public DayOfWeek? DayOfWeek { get; }

Property Value

DayOfWeek?

The day of the week.

FromTime

Gets the timeSpan since the start of the period.

public TimeSpan? FromTime { get; }

Property Value

TimeSpan?

The time the worktime starts.

ToTime

Gets the timeSpan to the end of the period.

public TimeSpan? ToTime { get; }

Property Value

TimeSpan?

The time the work time ends.

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 WorkTimeDetail

The first WorkTimeDetail

w2 WorkTimeDetail

The 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.