Table of Contents

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

day WeeklyTimerDay<TPattern>

The day to edit.

pattern TPattern

The intended scheduled settings.

Returns

TPattern

The inserted pattern, after normalizing its start time.

Type Parameters

TPattern

The 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

day WeeklyTimerDay<TPattern>

The day to clear.

Type Parameters

TPattern

The device family's pattern type.

CreateAc(string)

Creates an explicitly inactive AC weekly schedule.

public static AcSchedule CreateAc(string deviceGuid)

Parameters

deviceGuid string

The 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

schedule AcSchedule

The complete AC schedule.

weekday DayOfWeek

The 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

schedule AquareaSchedule

The complete Aquarea schedule.

weekday DayOfWeek

The 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

day WeeklyTimerDay<TPattern>

The day to edit.

startTime string

The device-local time identifying the entry.

Returns

bool

True if an entry was removed.

Type Parameters

TPattern

The 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

day WeeklyTimerDay<TPattern>

The day to edit.

pattern TPattern

The exact pattern object to remove.

Returns

bool

True if that object was present.

Type Parameters

TPattern

The 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

day WeeklyTimerDay<TPattern>

The day to edit.

patterns IEnumerable<TPattern>

The replacement pattern list.

Type Parameters

TPattern

The device family's pattern type.