コード例 #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;
        }
コード例 #2
0
 internal Money(decimal amount, Currency currency, ObsoleteCurrencyEventBehavior eventBehavior)
     : this()
 {
     setAllFields(amount, currency.IsoCode, eventBehavior);
 }