Table of Contents

JsonNotableDateCache Class

Definition

Namespace
Bodu.Globalization.Calendar.Caching
Assembly
Bodu.Globalization.Calendar.Caching.dll
Package
Bodu.Globalization.Calendar.Caching 1.0.0
Source
JsonNotableDateCache.cs

An INotableDateCache that persists computed years as JSON files, one file per territory.

public sealed class JsonNotableDateCache : FileNotableDateCacheBase, INotableDateCache
Inheritance
JsonNotableDateCache
Implements
Inherited Members
Extension Methods

Remarks

Structurally identical to TomlNotableDateCache but serialized with System.Text.Json: the territory, an Entries array of per-year metadata, and a flat Occurrences array. Malformed content is treated as an empty result, and all file-level resilience is provided by FileNotableDateCacheBase.

Constructors

JsonNotableDateCache(FileNotableDateCacheOptions, TimeProvider?, ILogger?)

Initializes a new instance of the JsonNotableDateCache class.

public JsonNotableDateCache(FileNotableDateCacheOptions options, TimeProvider? timeProvider = null, ILogger? logger = null)

Parameters

options FileNotableDateCacheOptions

The file-cache options that select the storage directory.

timeProvider TimeProvider

The time source the swallowed-failure warning rate-limiting is measured against, or null to use System.

logger ILogger

The logger that receives a rate-limited warning when a best-effort storage failure is swallowed, or null to disable that reporting.

Exceptions

ArgumentNullException

Thrown when options is null.

ArgumentException

Thrown when options fails validation.

Properties

FileExtension

Gets the file extension used by the concrete format, including the leading dot.

protected override string FileExtension { get; }

Property Value

string

The file extension, such as .toml or .json.

Applies to

ProductVersions
.NET8, 10