示例#1
0
        public Money Map(MoneyContract moneyContract)
        {
            if (moneyContract == null)
            {
                throw new ArgumentNullException("moneyContract");
            }

            return(new Money(moneyContract.Amount, moneyContract.CurrencyCode));
        }
示例#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);
        }