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
notableDateRefstringThe identifier of the concept to extend.
ruleIdstringThe stable identifier of the new rule.
configureAction<NotableDateRuleBuilder>A delegate that configures the new rule.
Returns
- OverrideBuilder
The same OverrideBuilder instance, enabling chained calls.
Exceptions
- ArgumentException
notableDateReforruleIdis null, empty, or white-space.- ArgumentNullException
configureis 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
notableDateRefstringThe identifier of the concept that owns the rule.
ruleRefstringThe identifier of the rule to patch.
configureAction<NotableDateRuleBuilder>A delegate that configures the sections to patch.
Returns
- OverrideBuilder
The same OverrideBuilder instance, enabling chained calls.
Exceptions
- ArgumentException
notableDateReforruleRefis null, empty, or white-space.- ArgumentNullException
configureis null.
RemoveRule(string, string)
Removes an existing rule from a concept.
public OverrideBuilder RemoveRule(string notableDateRef, string ruleRef)
Parameters
notableDateRefstringThe identifier of the concept that owns the rule.
ruleRefstringThe identifier of the rule to remove.
Returns
- OverrideBuilder
The same OverrideBuilder instance, enabling chained calls.
Exceptions
- ArgumentException
notableDateReforruleRefis null, empty, or white-space.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |