ISOCodex.Currency.Exchange.Abstractions 1.1.1

dotnet add package ISOCodex.Currency.Exchange.Abstractions --version 1.1.1
                    
NuGet\Install-Package ISOCodex.Currency.Exchange.Abstractions -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ISOCodex.Currency.Exchange.Abstractions" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ISOCodex.Currency.Exchange.Abstractions" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="ISOCodex.Currency.Exchange.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ISOCodex.Currency.Exchange.Abstractions --version 1.1.1
                    
#r "nuget: ISOCodex.Currency.Exchange.Abstractions, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ISOCodex.Currency.Exchange.Abstractions@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ISOCodex.Currency.Exchange.Abstractions&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=ISOCodex.Currency.Exchange.Abstractions&version=1.1.1
                    
Install as a Cake Tool

ISOCodex.Currency.Exchange.Abstractions

Public documentation and support

Version 1.1.1 targets netstandard2.0 for .NET Framework 4.7.2+ and modern .NET, replacing the redundant netstandard2.1 asset. Framework consumers should enable automatic assembly binding redirects.

Provider-neutral deterministic exchange-rate abstractions for ISOCodex.Currency.

Install

dotnet add package ISOCodex.Currency.Exchange.Abstractions --version 1.1.1

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 deferred future package work, not part of the 1.1.1 stable scope.

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 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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.1 125 9/19/2026
1.1.0 188 9/19/2026
1.0.2 158 6/23/2026
1.0.1 132 6/23/2026
1.0.0 133 6/23/2026
0.9.0-alpha.15 81 6/23/2026
0.9.0-alpha.14 80 6/23/2026
0.9.0-alpha.13 80 6/23/2026
0.9.0-alpha.12 77 6/23/2026
0.9.0-alpha.11 75 6/23/2026
0.9.0-alpha.10 82 6/23/2026
0.9.0-alpha.9 78 6/22/2026
0.9.0-alpha.8 83 6/22/2026
0.9.0-alpha.7 108 6/22/2026
0.9.0-alpha.6 85 6/22/2026
0.9.0-alpha.5 81 6/22/2026
0.9.0-alpha.4 85 6/22/2026
0.9.0-alpha.2 87 6/22/2026
0.9.0-alpha.1 83 6/22/2026
0.1.0-alpha.8 84 6/22/2026

Updated NuGet project and README links to public documentation and aligned ISOCodex patch dependencies. Existing APIs, targets and MIT licensing are unchanged.