RateCacheFile Class
Definition
- Namespace
- Bodu.Financial.ExchangeRates.Caching
- Assembly
- Bodu.Financial.ExchangeRates.Caching.dll
- Package
- Bodu.Financial.ExchangeRates.Caching 1.0.0
- Source
- RateCacheFile.cs
The root TOML table for a cache file, wrapping the array of cached rate rows together with the array of recorded coverage windows. TOML requires the document root to be a table, so each collection is nested under a named array-of-tables rather than serialized as a bare array.
public sealed class RateCacheFile
- Inheritance
-
RateCacheFile
- Inherited Members
- Extension Methods
Constructors
RateCacheFile()
public RateCacheFile()
Properties
Coverage
Gets or sets the recorded coverage windows, serialized as a TOML array of tables.
public List<RateCacheCoverageEntry> Coverage { get; set; }
Property Value
- List<RateCacheCoverageEntry>
The coverage windows recording which date ranges were fetched.
Remarks
A cache file written before coverage was tracked has no coverage array; it deserializes to an empty list so old caches keep working, with ranges simply refetched until coverage is recorded.
Entries
Gets or sets the cached rate rows, serialized as a TOML array of tables.
public List<RateCacheEntry> Entries { get; set; }
Property Value
- List<RateCacheEntry>
The cached rate rows.
From
Gets or sets the source currency of the pair the file holds.
public string? From { get; set; }
Property Value
Provider
Gets or sets the name of the provider whose rates the file holds.
public string? Provider { get; set; }
Property Value
Remarks
Recorded as a top-level key so a file identifies its own provider and currency pair, rather than relying solely on the file name and directory layout. A cache file written before these keys were recorded simply has none of them and deserializes them to null, so older caches remain readable.
To
Gets or sets the destination currency of the pair the file holds.
public string? To { get; set; }
Property Value
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |