ISOCodex.Currency.Exchange.Abstractions
1.0.2
dotnet add package ISOCodex.Currency.Exchange.Abstractions --version 1.0.2
NuGet\Install-Package ISOCodex.Currency.Exchange.Abstractions -Version 1.0.2
<PackageReference Include="ISOCodex.Currency.Exchange.Abstractions" Version="1.0.2" />
<PackageVersion Include="ISOCodex.Currency.Exchange.Abstractions" Version="1.0.2" />
<PackageReference Include="ISOCodex.Currency.Exchange.Abstractions" />
paket add ISOCodex.Currency.Exchange.Abstractions --version 1.0.2
#r "nuget: ISOCodex.Currency.Exchange.Abstractions, 1.0.2"
#:package ISOCodex.Currency.Exchange.Abstractions@1.0.2
#addin nuget:?package=ISOCodex.Currency.Exchange.Abstractions&version=1.0.2
#tool nuget:?package=ISOCodex.Currency.Exchange.Abstractions&version=1.0.2
ISOCodex.Currency.Exchange.Abstractions
Provider-neutral deterministic exchange-rate abstractions for ISOCodex.Currency.
Install
dotnet add package ISOCodex.Currency.Exchange.Abstractions --version 1.0.2
Scope
This package defines the exchange-rate contracts and a direct-rate MoneyConverter. It deliberately does not include a live exchange-rate provider and does not make network calls. Applications supply rates from their own approved source, such as an audited database, file import, internal policy table, or a separately reviewed provider package.
The initial converter supports direct rates only. Inverse, triangulated, cached, and live-provider behaviours are future package work.
Example
using ISOCodex.Currency;
using ISOCodex.Currency.Exchange.Abstractions;
var effectiveDate = new DateTime(2026, 6, 22, 0, 0, 0, DateTimeKind.Utc);
var rate = new ExchangeRate(
new CurrencyPair(CurrencyCode.GBP, CurrencyCode.USD),
1.2345m,
ExchangeRateKind.MidMarket,
effectiveDate,
"finance-approved-rates.csv");
IExchangeRateProvider provider = new InMemoryExchangeRateProvider(rate);
var converter = new MoneyConverter(provider);
var result = converter.Convert(
Money.Of(10.00m, CurrencyCode.GBP),
new ConversionOptions(
CurrencyCode.USD,
effectiveDate,
ExchangeRateKind.MidMarket,
CurrencyRoundingPolicy.AwayFromZero()));
Console.WriteLine(result.RawAmount); // 12.345000
Console.WriteLine(result.RoundedAmount); // 12.35
Console.WriteLine(result.Output); // USD 12.35
Console.WriteLine(result.RateSource); // finance-approved-rates.csv
A minimal provider can be implemented in application code:
public sealed class InMemoryExchangeRateProvider : IExchangeRateProvider
{
private readonly ExchangeRate _rate;
public InMemoryExchangeRateProvider(ExchangeRate rate)
{
_rate = rate;
}
public ExchangeRateLookupResult GetRate(
CurrencyPair pair,
DateTime effectiveDate,
ExchangeRateKind rateKind)
{
if (_rate.Pair == pair && _rate.EffectiveDate == effectiveDate && _rate.Kind == rateKind)
{
return ExchangeRateLookupResult.Success(_rate);
}
return ExchangeRateLookupResult.Failure(
ExchangeRateLookupFailureReason.RateUnavailable,
$"No rate for {pair} on {effectiveDate:O}.");
}
}
Audit behaviour
ConversionResult includes:
- input money;
- output money;
- direct rate used;
- raw unrounded target amount;
- rounded target amount;
- requested effective date;
- requested rate kind;
- explicit rounding policy;
- rate source.
This is enough for deterministic replay when the application preserves the same input, rate, effective date, rate kind, and rounding policy.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- ISOCodex.Currency (>= 1.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2 | 105 | 6/23/2026 |
| 1.0.1 | 100 | 6/23/2026 |
| 1.0.0 | 99 | 6/23/2026 |
| 0.9.0-alpha.15 | 55 | 6/23/2026 |
| 0.9.0-alpha.14 | 55 | 6/23/2026 |
| 0.9.0-alpha.13 | 58 | 6/23/2026 |
| 0.9.0-alpha.12 | 54 | 6/23/2026 |
| 0.9.0-alpha.11 | 53 | 6/23/2026 |
| 0.9.0-alpha.10 | 57 | 6/23/2026 |
| 0.9.0-alpha.9 | 54 | 6/22/2026 |
| 0.9.0-alpha.8 | 58 | 6/22/2026 |
| 0.9.0-alpha.7 | 67 | 6/22/2026 |
| 0.9.0-alpha.6 | 58 | 6/22/2026 |
| 0.9.0-alpha.5 | 59 | 6/22/2026 |
| 0.9.0-alpha.4 | 58 | 6/22/2026 |
| 0.9.0-alpha.2 | 63 | 6/22/2026 |
| 0.9.0-alpha.1 | 55 | 6/22/2026 |
| 0.1.0-alpha.8 | 56 | 6/22/2026 |