IWeekendDefinitionProvider Interface
Definition
Defines a provider interface for determining whether a given DayOfWeek is considered part of the weekend.
public interface IWeekendDefinitionProvider
- Extension Methods
Remarks
Implement this interface to supply custom weekend definitions that are not covered by the built-in WorkingDaysOfWeek presets. This allows support for region-specific, cultural, or organizational weekend patterns beyond standard configurations such as MondayToFriday or SundayToThursday.
Methods
IsWeekend(DayOfWeek)
Determines whether the specified DayOfWeek is considered part of the weekend.
bool IsWeekend(DayOfWeek dayOfWeek)
Parameters
dayOfWeekDayOfWeekThe day of the week to evaluate.
Returns
Remarks
This method applies the logic defined by the implementing provider, which may differ from the commonly used WorkingDaysOfWeek presets such as MondayToFriday or SaturdayToThursday. Custom implementations enable support for hybrid, rotating, or domain-specific weekend rules.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |