NotableDateServiceOptions Class
Definition
- Namespace
- Bodu.Globalization.Calendar
- Assembly
- Bodu.Globalization.Calendar.dll
- Package
- Bodu.Globalization.Calendar 1.0.1
Bundles the optional collaborators a NotableDateService consults when a document references custom algorithms, collision resolution, adjustment handlers, trigger handlers, or code-first providers.
public sealed class NotableDateServiceOptions
- Inheritance
-
NotableDateServiceOptions
- Inherited Members
- Extension Methods
Examples
NotableDateServiceOptions options = new()
{
Algorithms = new NotableDateAlgorithmRegistry().Register("contoso.harvest-moon", new HarvestMoonAlgorithm()),
Providers = new[] { myProvider },
};
NotableDateService service = new(resource, options);
Remarks
Every property is independently optional. Where a property is null the service uses its built-in behaviour for that concern. Construct an instance with an object initializer and pass it to NotableDateService(NotableDateResource, NotableDateServiceOptions?).
Constructors
NotableDateServiceOptions()
public NotableDateServiceOptions()
Properties
Algorithms
Gets the custom algorithm registry consulted for keys the built-in catalogue does not recognize.
public INotableDateAlgorithmRegistry? Algorithms { get; init; }
Property Value
- INotableDateAlgorithmRegistry
An INotableDateAlgorithmRegistry, or null for built-in algorithms only.
CollisionResolver
Gets the custom same-day collision resolver consulted when the resource's collision policy is Custom.
public INotableDateCollisionResolver? CollisionResolver { get; init; }
Property Value
Handlers
Gets the adjustment-handler registry consulted when an adjustment action is Custom.
public IAdjustmentHandlerRegistry? Handlers { get; init; }
Property Value
Providers
Gets the code-first providers contributing finished occurrences alongside the resource's authored rules.
public IEnumerable<INotableDateProvider>? Providers { get; init; }
Property Value
- IEnumerable<INotableDateProvider>
A sequence of INotableDateProvider, or null for none.
TriggerHandlers
Gets the trigger-handler registry consulted when an adjustment trigger is Custom.
public IAdjustmentTriggerHandlerRegistry? TriggerHandlers { get; init; }
Property Value
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |