RateCacheDirectoryContext Struct
Definition
- Namespace
- Bodu.Financial.ExchangeRates.Caching
- Assembly
- Bodu.Financial.ExchangeRates.Caching.dll
- Package
- Bodu.Financial.ExchangeRates.Caching 1.0.0
Supplies the inputs a directory resolver needs to choose the folder that holds a currency pair's cache file or files: the configured cache root, the bound provider, and the currency pair.
public readonly struct RateCacheDirectoryContext : IEquatable<RateCacheDirectoryContext>
- Implements
- Inherited Members
- Extension Methods
Remarks
Passed to the directory delegate of an RateCacheFileLayout so a consumer can shape the folder hierarchy - for example a flat folder, a per-provider folder, or a per-provider-then-per-pair tree.
Constructors
RateCacheDirectoryContext(string, string, CurrencyPair)
Initializes a new instance of the RateCacheDirectoryContext struct.
public RateCacheDirectoryContext(string root, string provider, CurrencyPair pair)
Parameters
rootstringThe resolved cache root directory.
providerstringThe provider the cache is bound to.
pairCurrencyPairThe currency pair the folder holds.
Properties
Pair
Gets the currency pair the resolved folder holds.
public CurrencyPair Pair { get; }
Property Value
- CurrencyPair
The currency pair.
Provider
Gets the provider the cache is bound to.
public string Provider { get; }
Property Value
- string
The provider identifier.
Root
Gets the resolved cache root directory.
public string Root { get; }
Property Value
- string
The cache root directory.
Methods
Equals(RateCacheDirectoryContext)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(RateCacheDirectoryContext other)
Parameters
otherRateCacheDirectoryContextAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(RateCacheDirectoryContext, RateCacheDirectoryContext)
public static bool operator ==(RateCacheDirectoryContext left, RateCacheDirectoryContext right)
Parameters
Returns
operator !=(RateCacheDirectoryContext, RateCacheDirectoryContext)
public static bool operator !=(RateCacheDirectoryContext left, RateCacheDirectoryContext right)
Parameters
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |