WorkingTimePeriod

Ecng.ComponentModel

Schedule validity period.

Herda de: Cloneable<WorkingTimePeriod>

Implementa: IAsyncPersistable

Construtores

WorkingTimePeriod
public WorkingTimePeriod()
workingTimePeriod = WorkingTimePeriod()

Initializes a new instance of the WorkingTimePeriod.

Propriedades

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.

Métodos

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

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

Retorna: A new object that is a copy of this instance.

LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = workingTimePeriod.LoadAsync(storage, cancellationToken)

Asynchronously loads the state of the object from the specified SettingsStorage.

storage
The SettingsStorage instance from which to load the data.
cancellationToken
A token to monitor for cancellation requests.

Retorna: A task that represents the asynchronous load operation.

SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = workingTimePeriod.SaveAsync(storage, cancellationToken)

Asynchronously saves the state of the object to the specified SettingsStorage.

storage
The SettingsStorage instance to which to save the data.
cancellationToken
A token to monitor for cancellation requests.

Retorna: A task that represents the asynchronous save operation.

ToString
public override string ToString()
result = workingTimePeriod.ToString()

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

Retorna: A string representing the tuple's values.