Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/nazarii-piontko/moneyhandler
- Owner: nazarii-piontko
- License: unlicense
- Created: 2013-10-29T17:28:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-21T10:35:23.000Z (about 11 years ago)
- Last Synced: 2023-08-05T07:21:40.194Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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();