ScheduleIsActiveTime(DateTime, Schedule, Schedule) Method
if schedule have OfficeHours type it references some other "parent" schedule which should define the exact set of time ranges
This method allows to combine check of "inherited" schedules and return result from the first which defines exact time ranges
Namespace: TCX.ConfigurationAssembly: 3cxpscomcpp2 (in 3cxpscomcpp2.dll) Version: 20.0.1
public bool IsActiveTime(
DateTime dt,
out Schedule definedBy,
params Schedule[] parentSchedules
)
- dt DateTime
- the exact date time in the time zone of schedule. No conversion is performed.
- definedBy Schedule
- the refrence to the schedule (one of the parentSchedules) which gave the result. could be set to null, what means that there are no schedule which can define the result.
- parentSchedules Schedule
- the schedules which should be recoursively used in case if schedule has OfficeHours type.
Booleananswers the question: "does the schedule is active at specified time".
HoursTypev alue influences result:
AllHours - always Active time. could be deactivated at holidays to make it except holidays only
Never - always inactive time. such schedule can be activated at holidays to make it holidays only
OfficeHours or
BreakTime - returns value using chain specified by
parentSchedulesOutOfOfficeHours - returns negated value returned by
parentSchedulesSpecificHours or
SpecificHoursExcludingHolidays - true - if the requested time is in the one of schedule time ranges
OutOfSpecificHours or
OutOfSpecificHoursIncludingHolidays - true if requested time is not in any of schedule time ranges
otherwise - false.
if all the schedules (this and
parentSchedules) are of OfficeHours/Out of office hours type. return value is false and
definedBy is set to null.