AdjustmentScopeBuilder Class
Definition
- Namespace
- Bodu.Globalization.Calendar.Builder
- Assembly
- Bodu.Globalization.Calendar.Builder.dll
- Package
- Bodu.Globalization.Calendar.Builder 1.0.0
Provides a fluent surface for narrowing the scope of an adjustment policy by territory, calendar, category, concept, rule, and year, restricting the occurrences the policy may transform.
public sealed class AdjustmentScopeBuilder
- Inheritance
-
AdjustmentScopeBuilder
- Inherited Members
- Extension Methods
Methods
ExceptYear(int)
Adds an explicitly excluded year to the scope.
public AdjustmentScopeBuilder ExceptYear(int year)
Parameters
yearintThe year to exclude.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
ForCalendar(CalendarSystem)
Adds a calendar system to the scope.
public AdjustmentScopeBuilder ForCalendar(CalendarSystem calendar)
Parameters
calendarCalendarSystemThe calendar system.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
ForCategory(NotableDateCategory)
Adds a category to the scope.
public AdjustmentScopeBuilder ForCategory(NotableDateCategory category)
Parameters
categoryNotableDateCategoryThe category.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
ForNotableDate(string)
Adds a concept reference to the scope.
public AdjustmentScopeBuilder ForNotableDate(string notableDateRef)
Parameters
notableDateRefstringThe identifier of the concept to include.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
Exceptions
- ArgumentException
notableDateRefis null, empty, or white-space.
ForRule(string, string)
Adds a concept-and-rule reference to the scope.
public AdjustmentScopeBuilder ForRule(string notableDateRef, string ruleRef)
Parameters
notableDateRefstringThe identifier of the concept that owns the rule.
ruleRefstringThe identifier of the rule within the concept.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
Exceptions
- ArgumentException
notableDateReforruleRefis null, empty, or white-space.
ForTerritory(string)
Adds a territory code to the scope.
public AdjustmentScopeBuilder ForTerritory(string code)
Parameters
codestringThe ISO territory code.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
Exceptions
- ArgumentException
codeis null, empty, or white-space.
FromYear(int)
Sets the inclusive lower year bound of the scope.
public AdjustmentScopeBuilder FromYear(int year)
Parameters
yearintThe first year in scope.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
OnlyYear(int)
Adds an explicitly included year to the scope.
public AdjustmentScopeBuilder OnlyYear(int year)
Parameters
yearintThe year to include.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
ToYear(int)
Sets the inclusive upper year bound of the scope.
public AdjustmentScopeBuilder ToYear(int year)
Parameters
yearintThe last year in scope.
Returns
- AdjustmentScopeBuilder
The same AdjustmentScopeBuilder instance, enabling chained calls.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |