Table of Contents

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

pair CurrencyPair

The currency pair the series describes.

provider string

The non-empty identifier of the publishing source.

Exceptions

ArgumentException

Thrown if pair is the default-struct value (and therefore carries null ISO codes), or if provider is empty or white-space.

ArgumentNullException

Thrown if provider is 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

other RateSeriesKey

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

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

left RateSeriesKey
right RateSeriesKey

Returns

bool

operator !=(RateSeriesKey, RateSeriesKey)

public static bool operator !=(RateSeriesKey left, RateSeriesKey right)

Parameters

left RateSeriesKey
right RateSeriesKey

Returns

bool

Applies to

ProductVersions
.NET8, 10