Table of Contents

Class Schedule

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

The class representing a schedule.

public class Schedule : Entity, IEntity, IComparable, IIdentifiable
Inheritance
Schedule
Implements
Inherited Members

Constructors

Schedule()

Initializes a new instance of the Schedule class.

public Schedule()

Schedule(Id?, ScheduleFrequency, int, IList<DayOfWeek>?, in DateTime, DateTime?)

Initializes a new instance of the Schedule class.

public Schedule(Id? id, ScheduleFrequency frequency, int repeatCycle, IList<DayOfWeek>? daysOfWeek, in DateTime startDate, DateTime? endDate)

Parameters

id Id

The Id.

frequency ScheduleFrequency

The frequency of the schedule.

repeatCycle int

The repeat cycle of the schedule.

daysOfWeek IList<DayOfWeek>

The days of week which schedule repeats on.

startDate DateTime

The start date of the schedule.

endDate DateTime?

The end date of the schedule.

Properties

DaysOfWeek

Gets or sets the days which schedule repeats on.

public IList<DayOfWeek>? DaysOfWeek { get; set; }

Property Value

IList<DayOfWeek>

DayOfWeek

EndDate

Gets or sets the end date for the schedule.

public DateTime? EndDate { get; set; }

Property Value

DateTime?

DateTime

Frequency

Gets or sets the frequency of the schedule.

public ScheduleFrequency Frequency { get; set; }

Property Value

ScheduleFrequency

ScheduleFrequency

RepeatCycle

Gets or sets the repeat cycle.

public int RepeatCycle { get; set; }

Property Value

int

int

StartDate

Gets or sets the start date for the schedule.

public DateTime StartDate { get; set; }

Property Value

DateTime

DateTime

Methods

CalculateNextScheduleDate(in DateTime, in DateTime)

Calculates next schedule date for this instance.

public DateTime? CalculateNextScheduleDate(in DateTime dateTimeLocal, in DateTime previousScheduleDateLocal)

Parameters

dateTimeLocal DateTime

The local datetime for calculating next schedule.

previousScheduleDateLocal DateTime

The last calculated datetime of the schedule.

Returns

DateTime?

The next schedule date.

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.