Class ScheduleEditing
- Namespace
- PanasonicComfortCloudClient.Models
- Assembly
- PanasonicComfortCloudClient.dll
Creates and edits typed weekly schedules using the upstream seven-day/six-pattern rules.
public static class ScheduleEditing
- Inheritance
-
ScheduleEditing
- Inherited Members
Methods
AddPattern<TPattern>(WeeklyTimerDay<TPattern>, TPattern)
Adds a pattern, replacing an entry with the same start time and retaining other active entries.
public static TPattern AddPattern<TPattern>(this WeeklyTimerDay<TPattern> day, TPattern pattern) where TPattern : TimerPattern
Parameters
dayWeeklyTimerDay<TPattern>The day to edit.
patternTPatternThe intended scheduled settings.
Returns
- TPattern
The inserted pattern, after normalizing its start time.
Type Parameters
TPatternThe device family's pattern type.
Clear<TPattern>(WeeklyTimerDay<TPattern>)
Clears the selected day's patterns while preserving its unknown metadata.
public static void Clear<TPattern>(this WeeklyTimerDay<TPattern> day) where TPattern : TimerPattern
Parameters
dayWeeklyTimerDay<TPattern>The day to clear.
Type Parameters
TPatternThe device family's pattern type.
CreateAc(string)
Creates an explicitly inactive AC weekly schedule.
public static AcSchedule CreateAc(string deviceGuid)
Parameters
deviceGuidstringThe device to which the complete schedule belongs.
Returns
- AcSchedule
Seven empty weekdays, Monday first, with activation false.
CreateAquarea()
Creates an explicitly inactive Aquarea weekly schedule.
public static AquareaSchedule CreateAquarea()
Returns
- AquareaSchedule
Seven empty weekdays, Monday first, with operation zero.
Day(AcSchedule, DayOfWeek)
Selects one existing AC weekday without changing any other day.
public static WeeklyTimerDay<AcTimerPattern> Day(this AcSchedule schedule, DayOfWeek weekday)
Parameters
scheduleAcScheduleThe complete AC schedule.
weekdayDayOfWeekThe device-local weekday.
Returns
- WeeklyTimerDay<AcTimerPattern>
The selected mutable day.
Day(AquareaSchedule, DayOfWeek)
Selects one existing Aquarea weekday.
public static WeeklyTimerDay<AquareaTimerPattern> Day(this AquareaSchedule schedule, DayOfWeek weekday)
Parameters
scheduleAquareaScheduleThe complete Aquarea schedule.
weekdayDayOfWeekThe device-local weekday.
Returns
- WeeklyTimerDay<AquareaTimerPattern>
The selected mutable day.
RemovePattern<TPattern>(WeeklyTimerDay<TPattern>, string)
Removes an active pattern by normalized start time.
public static bool RemovePattern<TPattern>(this WeeklyTimerDay<TPattern> day, string startTime) where TPattern : TimerPattern
Parameters
dayWeeklyTimerDay<TPattern>The day to edit.
startTimestringThe device-local time identifying the entry.
Returns
- bool
True if an entry was removed.
Type Parameters
TPatternThe device family's pattern type.
RemovePattern<TPattern>(WeeklyTimerDay<TPattern>, TPattern)
Removes a pattern by object identity.
public static bool RemovePattern<TPattern>(this WeeklyTimerDay<TPattern> day, TPattern pattern) where TPattern : TimerPattern
Parameters
dayWeeklyTimerDay<TPattern>The day to edit.
patternTPatternThe exact pattern object to remove.
Returns
- bool
True if that object was present.
Type Parameters
TPatternThe device family's pattern type.
SetPatterns<TPattern>(WeeklyTimerDay<TPattern>, IEnumerable<TPattern>)
Atomically replaces a day's active patterns after validating all of them.
public static void SetPatterns<TPattern>(this WeeklyTimerDay<TPattern> day, IEnumerable<TPattern> patterns) where TPattern : TimerPattern
Parameters
dayWeeklyTimerDay<TPattern>The day to edit.
patternsIEnumerable<TPattern>The replacement pattern list.
Type Parameters
TPatternThe device family's pattern type.