RateSeriesKey Struct
Definition
- Namespace
- Bodu.Financial.ExchangeRates
- Assembly
- Bodu.Financial.dll
- Package
- Bodu.Financial 1.0.0
- Source
- RateSeriesKey.cs
Identifies a single rate series within an RateTableBuilder by its currency pair and provider.
public readonly struct RateSeriesKey : IEquatable<RateSeriesKey>
- Implements
- Inherited Members
- Extension Methods
Remarks
Provider equality is intentionally Ordinal - two keys whose providers differ only in letter case are considered distinct. Callers that need case-insensitive grouping should normalise the provider identifier before constructing the key.
Constructors
RateSeriesKey(CurrencyPair, string)
Initializes a new instance of the RateSeriesKey struct.
public RateSeriesKey(CurrencyPair pair, string provider)
Parameters
pairCurrencyPairThe currency pair the series describes.
providerstringThe non-empty identifier of the publishing source.
Exceptions
- ArgumentException
Thrown if
pairis the default-struct value (and therefore carries null ISO codes), or ifprovideris empty or white-space.- ArgumentNullException
Thrown if
provideris null.
Properties
Pair
Gets the currency pair the series describes.
public CurrencyPair Pair { get; }
Property Value
- CurrencyPair
The directional pair.
Provider
Gets the non-empty identifier of the publishing source.
public string Provider { get; }
Property Value
- string
The provider identifier, compared ordinally.
Methods
Equals(RateSeriesKey)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(RateSeriesKey other)
Parameters
otherRateSeriesKeyAn 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 ==(RateSeriesKey, RateSeriesKey)
public static bool operator ==(RateSeriesKey left, RateSeriesKey right)
Parameters
leftRateSeriesKeyrightRateSeriesKey
Returns
operator !=(RateSeriesKey, RateSeriesKey)
public static bool operator !=(RateSeriesKey left, RateSeriesKey right)
Parameters
leftRateSeriesKeyrightRateSeriesKey
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |