Table of Contents

RateCacheEntry Class

Definition

Namespace
Bodu.Financial.ExchangeRates.Caching
Assembly
Bodu.Financial.ExchangeRates.Caching.dll
Package
Bodu.Financial.ExchangeRates.Caching 1.0.0
Source
RateCacheEntry.cs

The mutable serialization shape of one cached rate row, distinct from the public CachedRate value so the on-disk format can evolve independently of the in-memory contract.

public sealed class RateCacheEntry
Inheritance
RateCacheEntry
Inherited Members
Extension Methods

Constructors

RateCacheEntry()

public RateCacheEntry()

Properties

CachedAtUtc

Gets or sets the UTC instant at which the rate was written to the cache.

public DateTimeOffset CachedAtUtc { get; set; }

Property Value

DateTimeOffset

The caching instant.

Date

Gets or sets the observation date of the rate.

public DateOnly Date { get; set; }

Property Value

DateOnly

The observation date.

ObservedAtUtc

Gets or sets the UTC instant the upstream data backing the rate was originally fetched, or null when the source did not supply it.

public DateTimeOffset? ObservedAtUtc { get; set; }

Property Value

DateTimeOffset?

The upstream fetch instant, or null when not tracked.

Remarks

A cache file written before this field was tracked has no ObservedAtUtc key; it deserializes to null with no error, mirroring how a pre-coverage file deserializes its missing [[Coverage]] array, so older caches remain readable.

Rate

Gets or sets the observed rate for Date.

public decimal Rate { get; set; }

Property Value

decimal

The observed rate.

Applies to

ProductVersions
.NET8, 10