Class ContentResult
A resolved content value together with its provenance.
public record ContentResult : IEquatable<ContentResult>
- Inheritance
-
ContentResult
- Implements
- Inherited Members
Remarks
The older (string Value, bool Success) tuple is kept for backward compatibility, but its
Success flag is not a source discriminator — it is true for a cache hit, a stale
cache hit and a fresh server fetch alike, and false for a missing API key, a 404, a
timeout and an exception alike. Use Source when the distinction matters.
Properties
Source
Where Value came from.
public required ContentSource Source { get; init; }
Property Value
Stale
True when the value is not known to be current — a stale cache entry, or a default standing in for a value the server never confirmed.
public required bool Stale { get; init; }
Property Value
Success
Whether the lookup path completed without falling back. Retained to match the legacy tuple; prefer Source for anything finer-grained.
public required bool Success { get; init; }
Property Value
Value
The resolved value. Never null — falls back to the caller's default.
public required string Value { get; init; }