Skip to content

A .NET wrapper for the REST API of the currency exchange rates of Banca d'Italia (the central bank of Italy).

License

Notifications You must be signed in to change notification settings

maurizuki/BIExchangeRates.Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BIExchangeRates.Client

language GitHub Workflow Status (with event) issues Nuget Nuget

A .NET wrapper for the REST API of the currency exchange rates of Banca d'Italia (the central bank of Italy).

Getting started

To add BIExchangeRates.Client to your project, you can use the following NuGet Package Manager command:

Install-Package BIExchangeRates.Client

More options are available on the BIExchangeRates.Client page of the NuGet Gallery website.

The console application BIExchangeRates.Console is intended as an example on how to use the REST API wrapper in a real scenario.

Remarks

The class ExchangeRatesClient is derived from HttpClient that is intended to be instantiated once and re-used throughout the life of an application. Instantiating an ExchangeRatesClient class for every request will exhaust the number of sockets available under heavy loads. This will result in SocketException errors. Below is an example using ExchangeRatesClient correctly.

public class GoodController : ApiController
{
    private static readonly ExchangeRatesClient ExchangeRatesClient;

    static GoodController()
    {
        ExchangeRatesClient = new ExchangeRatesClient();
    }
}

Documentation

About

A .NET wrapper for the REST API of the currency exchange rates of Banca d'Italia (the central bank of Italy).

Topics

Resources

License

Stars

Watchers

Forks

Languages