NullImfReportCache Class
Definition
- Namespace
- Bodu.Financial.ExchangeRates
- Assembly
- Bodu.Financial.ExchangeRates.Imf.dll
- Package
- Bodu.Financial.ExchangeRates.Imf 0.7.1
- Source
- NullImfReportCache.cs
An IImfReportCache that stores nothing, used when on-disk caching is disabled.
public sealed class NullImfReportCache : IImfReportCache
- Inheritance
-
NullImfReportCache
- Implements
- Inherited Members
- Extension Methods
Properties
Instance
Gets the shared instance of the no-op cache.
public static NullImfReportCache Instance { get; }
Property Value
- NullImfReportCache
The singleton NullImfReportCache.
Methods
Store(ImfReportMonth, byte[])
Stores the bytes for a report month, replacing any existing entry.
public void Store(ImfReportMonth month, byte[] bytes)
Parameters
monthImfReportMonthThe report month whose file is being cached.
bytesbyte[]The report bytes to store.
TryGet(ImfReportMonth, TimeSpan, out byte[])
Attempts to retrieve the cached bytes for a report month.
public bool TryGet(ImfReportMonth month, TimeSpan refreshInterval, out byte[] bytes)
Parameters
monthImfReportMonthThe report month whose file is requested.
refreshIntervalTimeSpanThe maximum age at which a current-month report is still considered fresh.
bytesbyte[]When this method returns true, the cached report bytes; otherwise null.
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |