Table of Contents

AdjustmentScopeBuilder Class

Definition

Namespace
Bodu.Globalization.Calendar.Builder
Assembly
Bodu.Globalization.Calendar.Builder.dll
Package
Bodu.Globalization.Calendar.Builder 1.0.0
Source
AdjustmentScopeBuilder.cs

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

year int

The 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

calendar CalendarSystem

The 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

category NotableDateCategory

The 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

notableDateRef string

The identifier of the concept to include.

Returns

AdjustmentScopeBuilder

The same AdjustmentScopeBuilder instance, enabling chained calls.

Exceptions

ArgumentException

notableDateRef is 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

notableDateRef string

The identifier of the concept that owns the rule.

ruleRef string

The identifier of the rule within the concept.

Returns

AdjustmentScopeBuilder

The same AdjustmentScopeBuilder instance, enabling chained calls.

Exceptions

ArgumentException

notableDateRef or ruleRef is null, empty, or white-space.

ForTerritory(string)

Adds a territory code to the scope.

public AdjustmentScopeBuilder ForTerritory(string code)

Parameters

code string

The ISO territory code.

Returns

AdjustmentScopeBuilder

The same AdjustmentScopeBuilder instance, enabling chained calls.

Exceptions

ArgumentException

code is null, empty, or white-space.

FromYear(int)

Sets the inclusive lower year bound of the scope.

public AdjustmentScopeBuilder FromYear(int year)

Parameters

year int

The 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

year int

The 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

year int

The last year in scope.

Returns

AdjustmentScopeBuilder

The same AdjustmentScopeBuilder instance, enabling chained calls.

Applies to

ProductVersions
.NET8, 10