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
IdThe Id.
frequency
ScheduleFrequencyThe frequency of the schedule.
repeatCycle
intThe repeat cycle of the schedule.
daysOfWeek
IList<DayOfWeek>The days of week which schedule repeats on.
startDate
DateTimeThe 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
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
dateTimeLocal
DateTimeThe local datetime for calculating next schedule.
previousScheduleDateLocal
DateTimeThe 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.