Table of Contents

OverrideBuilder Class

Definition

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

Provides a fluent surface for authoring identifier-targeted override operations that add, patch, or remove rules after the base concepts and imports are assembled.

public sealed class OverrideBuilder
Inheritance
OverrideBuilder
Inherited Members
Extension Methods

Methods

AddRule(string, string, Action<NotableDateRuleBuilder>)

Adds a new rule to an existing concept.

public OverrideBuilder AddRule(string notableDateRef, string ruleId, Action<NotableDateRuleBuilder> configure)

Parameters

notableDateRef string

The identifier of the concept to extend.

ruleId string

The stable identifier of the new rule.

configure Action<NotableDateRuleBuilder>

A delegate that configures the new rule.

Returns

OverrideBuilder

The same OverrideBuilder instance, enabling chained calls.

Exceptions

ArgumentException

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

ArgumentNullException

configure is null.

PatchRule(string, string, Action<NotableDateRuleBuilder>)

Patches selected sections of an existing rule. Only the rule sections configured by the delegate are emitted.

public OverrideBuilder PatchRule(string notableDateRef, string ruleRef, Action<NotableDateRuleBuilder> configure)

Parameters

notableDateRef string

The identifier of the concept that owns the rule.

ruleRef string

The identifier of the rule to patch.

configure Action<NotableDateRuleBuilder>

A delegate that configures the sections to patch.

Returns

OverrideBuilder

The same OverrideBuilder instance, enabling chained calls.

Exceptions

ArgumentException

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

ArgumentNullException

configure is null.

RemoveRule(string, string)

Removes an existing rule from a concept.

public OverrideBuilder RemoveRule(string notableDateRef, string ruleRef)

Parameters

notableDateRef string

The identifier of the concept that owns the rule.

ruleRef string

The identifier of the rule to remove.

Returns

OverrideBuilder

The same OverrideBuilder instance, enabling chained calls.

Exceptions

ArgumentException

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

Applies to

ProductVersions
.NET8, 10