WorkingTime
Working schedule settings.
Herda de: Cloneable<WorkingTime>
Implementa: IAsyncPersistable
Construtores
public WorkingTime()
workingTime = WorkingTime()
Initializes a new instance of the WorkingTime.
Propriedades
public bool IsEnabled { get; set; }
value = workingTime.IsEnabled
workingTime.IsEnabled = value
Whether the schedule is active.
public List<WorkingTimePeriod> Periods { get; set; }
value = workingTime.Periods
workingTime.Periods = value
Schedule validity periods.
public IDictionary<DateTime, Range<TimeSpan>[]> SpecialDays { get; set; }
value = workingTime.SpecialDays
workingTime.SpecialDays = value
Special working days (holidays, shortened days, etc.).
public DateTime[] SpecialHolidays { get; set; }
value = workingTime.SpecialHolidays
workingTime.SpecialHolidays = value
Special holidays.
public DateTime[] SpecialWorkingDays { get; set; }
value = workingTime.SpecialWorkingDays
workingTime.SpecialWorkingDays = value
Special working days (non-standard working days, e.g., Saturday working days).
Métodos
public override WorkingTime Clone()
result = workingTime.Clone()
Creates a new object that is a copy of the current instance.
Retorna: A new object that is a copy of this instance.
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = workingTime.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.
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = workingTime.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.
public override string ToString()
result = workingTime.ToString()
Returns a string representation of the tuple, with values separated by commas.
Retorna: A string representing the tuple's values.