Table of Contents

RateCacheDirectoryContext Struct

Definition

Namespace
Bodu.Financial.ExchangeRates.Caching
Assembly
Bodu.Financial.ExchangeRates.Caching.dll
Package
Bodu.Financial.ExchangeRates.Caching 1.0.0
Source
RateCacheDirectoryContext.cs

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

root string

The resolved cache root directory.

provider string

The provider the cache is bound to.

pair CurrencyPair

The 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

other RateCacheDirectoryContext

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 ==(RateCacheDirectoryContext, RateCacheDirectoryContext)

public static bool operator ==(RateCacheDirectoryContext left, RateCacheDirectoryContext right)

Parameters

left RateCacheDirectoryContext
right RateCacheDirectoryContext

Returns

bool

operator !=(RateCacheDirectoryContext, RateCacheDirectoryContext)

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

Parameters

left RateCacheDirectoryContext
right RateCacheDirectoryContext

Returns

bool

Applies to

ProductVersions
.NET8, 10