WorkingTimePeriod
Ecng.ComponentModel
Schedule validity period.
继承自: Cloneable<WorkingTimePeriod>
实现: IPersistable
构造函数
WorkingTimePeriod
public WorkingTimePeriod()
workingTimePeriod = WorkingTimePeriod()
Initializes a new instance of the WorkingTimePeriod.
属性
SpecialDays
public IDictionary<DayOfWeek, Range<TimeSpan>[]> SpecialDays { get; set; }
value = workingTimePeriod.SpecialDays
workingTimePeriod.SpecialDays = value
Special working days with custom schedules by day of week.
Till
public DateTime Till { get; set; }
value = workingTimePeriod.Till
workingTimePeriod.Till = value
Schedule expiration date.
Times
public List<Range<TimeSpan>> Times { get; set; }
value = workingTimePeriod.Times
workingTimePeriod.Times = value
Schedule working time intervals within a day.
方法
Clone
public override WorkingTimePeriod Clone()
result = workingTimePeriod.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)
workingTimePeriod.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)
workingTimePeriod.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 = workingTimePeriod.ToString()
Returns a string representation of the tuple, with values separated by commas.
返回值: A string representing the tuple's values.