Esempio n. 1
0
        public Money Map(MoneyContract moneyContract)
        {
            if (moneyContract == null)
            {
                throw new ArgumentNullException("moneyContract");
            }

            return(new Money(moneyContract.Amount, moneyContract.CurrencyCode));
        }
Esempio n. 2
0
        public MoneyContract Map(Money money)
        {
            if (money == null)
            {
                throw new ArgumentNullException("money");
            }

            var mc = new MoneyContract();

            mc.Amount       = money.Amount;
            mc.CurrencyCode = money.CurrencyCode;
            return(mc);
        }