Method IMoneyBag.Create
IMoneyBag.Create(CurrencyRegistry, IEnumerable<MonetaryValue>)
Creates a bag that uses the specified currency registry and adds all the specified values.
Declaration
static IMoneyBag IMoneyBag.Create(CurrencyRegistry registry, IEnumerable<MonetaryValue> values)
Parameters
| Type | Name | Description |
|---|---|---|
| CurrencyRegistry | registry | |
| IEnumerable<MonetaryValue> | values |
Returns
| Type | Description |
|---|---|
| IMoneyBag |
Implements
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Attempted to add a value with a currency that is not available in the currency registry. |