Пример #1
0
 public static string ParseStr(MoneyValue amountStr)
 {
     //var splittedAmount = amountStr.Split(' ');
     //string currency = splittedAmount[1];
     //Decimal value = Decimal.Parse(splittedAmount[0]);
     return("a");
 }
Пример #2
0
 public static MoneyValue Sum <T>(this IEnumerable <T> source, Func <T, MoneyValue> selector)
 {
     return(MoneyValue.Of(source.Select(selector).Aggregate((x, y) => x + y)));
 }
Пример #3
0
 public static MoneyValue Of(MoneyValue value)
 {
     return(new MoneyValue(value.Value, value.Currency));
 }
Пример #4
0
 public MoneyValueOperationMustBePerformedOnTheSameCurrencyRule(MoneyValue left, MoneyValue right)
 {
     _left  = left;
     _right = right;
 }