Ejemplo n.º 1
0
        private void setAllFields(decimal amount, CurrencyIsoCode currency, ObsoleteCurrencyEventBehavior eventBehavior)
        {
            Enumeration.AssertDefined(currency);
            if (eventBehavior == ObsoleteCurrencyEventBehavior.Raise)
            {
                Currency.RaiseIfObsolete(currency);
            }

            Amount       = amount;
            CurrencyCode = currency;
        }
Ejemplo n.º 2
0
 internal Money(decimal amount, Currency currency, ObsoleteCurrencyEventBehavior eventBehavior)
     : this()
 {
     setAllFields(amount, currency.IsoCode, eventBehavior);
 }