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