public Money Map(MoneyContract moneyContract) { if (moneyContract == null) { throw new ArgumentNullException("moneyContract"); } return(new Money(moneyContract.Amount, moneyContract.CurrencyCode)); }
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); }