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
idIdThe Id.
frequencyScheduleFrequencyThe frequency of the schedule.
repeatCycleintThe repeat cycle of the schedule.
daysOfWeekIList<DayOfWeek>The days of week which schedule repeats on.
startDateDateTimeThe start date of the schedule.
endDateDateTime?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
EndDate
Gets or sets the end date for the schedule.
public DateTime? EndDate { get; set; }
Property Value
Frequency
Gets or sets the frequency of the schedule.
public ScheduleFrequency Frequency { get; set; }
Property Value
RepeatCycle
Gets or sets the repeat cycle.
public int RepeatCycle { get; set; }
Property Value
StartDate
Gets or sets the start date for the schedule.
public DateTime StartDate { get; set; }
Property Value
Methods
CalculateNextScheduleDate(in DateTime, in DateTime)
Calculates next schedule date for this instance.
public DateTime? CalculateNextScheduleDate(in DateTime dateTimeLocal, in DateTime previousScheduleDateLocal)
Parameters
dateTimeLocalDateTimeThe local datetime for calculating next schedule.
previousScheduleDateLocalDateTimeThe 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.