WorkingTime

Ecng.ComponentModel

Working schedule settings.

继承自: Cloneable<WorkingTime>

实现: IPersistable

构造函数

WorkingTime
public WorkingTime()
workingTime = WorkingTime()

Initializes a new instance of the WorkingTime.

属性

IsEnabled
public bool IsEnabled { get; set; }
value = workingTime.IsEnabled
workingTime.IsEnabled = value

Whether the schedule is active.

Periods
public List<WorkingTimePeriod> Periods { get; set; }
value = workingTime.Periods
workingTime.Periods = value

Schedule validity periods.

SpecialDays
public IDictionary<DateTime, Range<TimeSpan>[]> SpecialDays { get; set; }
value = workingTime.SpecialDays
workingTime.SpecialDays = value

Special working days (holidays, shortened days, etc.).

SpecialHolidays
public DateTime[] SpecialHolidays { get; set; }
value = workingTime.SpecialHolidays
workingTime.SpecialHolidays = value

Special holidays.

SpecialWorkingDays
public DateTime[] SpecialWorkingDays { get; set; }
value = workingTime.SpecialWorkingDays
workingTime.SpecialWorkingDays = value

Special working days (non-standard working days, e.g., Saturday working days).

方法

Clone
public override WorkingTime Clone()
result = workingTime.Clone()

Creates a new object that is a copy of the current instance.

返回值: A new object that is a copy of this instance.

Load
public void Load(SettingsStorage storage)
workingTime.Load(storage)

Loads the state of the object from the specified SettingsStorage.

storage
The SettingsStorage instance from which to load the data.
Save
public void Save(SettingsStorage storage)
workingTime.Save(storage)

Saves the state of the object to the specified SettingsStorage.

storage
The SettingsStorage instance to which to save the data.
ToString
public override string ToString()
result = workingTime.ToString()

Returns a string representation of the tuple, with values separated by commas.

返回值: A string representing the tuple's values.