Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nazarii-piontko/moneyhandler

.NET class library for money handling. It is advanced implementation of Enterprise Pattern Money described by Martin Fowler for .NET.
https://github.com/nazarii-piontko/moneyhandler

Last synced: about 15 hours ago
JSON representation

.NET class library for money handling. It is advanced implementation of Enterprise Pattern Money described by Martin Fowler for .NET.

Awesome Lists containing this project

README

        

Money Handler
===================

.NET class library for money handling. It is advanced implementation of Enterprise Pattern Money described by Martin Fowler for .NET.

###Posibilities:
* Create (instantiate) 'money', see example #1.
* Convert money from one currency to another (using different currencies rates providers, e.g. Yahoo Finance), example #2.
* Perform different arifmetic and boolean operations with automatic currency convertation if need, example #3.
* Support Binary and XML serialization.
* Parsing from String.
* etc.

##Usage

###Example #1 - Instantiating

* 1m.Euros();
* new Money(1, Currency.USD);
* Money.Parse("18 EUR");

###Example #2 - Converting

* 1m.Euros().ToDollars();
* 1m.Euros().ConvertToCurrency(Currency.GBP);

###Example #3 - Operations

* 2m.Dollars() + 3m.Euros();
* 2m.Dollars() + 2;
* 2m.Dollars() <= 2m.Euros();