WorkingTimePeriod

Ecng.ComponentModel

Schedule validity period.

Inherits: Cloneable<WorkingTimePeriod>

Implements: IPersistable

Constructors

WorkingTimePeriod
public WorkingTimePeriod()
workingTimePeriod = WorkingTimePeriod()

Initializes a new instance of the WorkingTimePeriod.

Properties

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.

Methods

Clone
public override WorkingTimePeriod Clone()
result = workingTimePeriod.Clone()

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

Returns: 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.

Returns: A string representing the tuple's values.