private void setAllFields(decimal amount, CurrencyIsoCode currency, ObsoleteCurrencyEventBehavior eventBehavior) { Enumeration.AssertDefined(currency); if (eventBehavior == ObsoleteCurrencyEventBehavior.Raise) { Currency.RaiseIfObsolete(currency); } Amount = amount; CurrencyCode = currency; }
internal Money(decimal amount, Currency currency, ObsoleteCurrencyEventBehavior eventBehavior) : this() { setAllFields(amount, currency.IsoCode, eventBehavior); }