public PaymentOffer( decimal exchangeRateIncludingMargin, Money paymentValue) { this.ExchangeRateIncludingMargin = exchangeRateIncludingMargin; this.PaymentValue = paymentValue; }
public OrderEntry( OrderEntryType type, Money value, DateTimeOffset timestamp) { this.Type = type; this.Value = value; this.Timestamp = timestamp; }
private Money DetermineNetPaymentsValue() { var _accumulatorSeed = new Money(this.Entries.First().Value.Currency, 0M); return this.c_entries .Aggregate( _accumulatorSeed, (accumulatedValue, entry) => { if (entry.Type == OrderEntryType.Debit) { return accumulatedValue + entry.Value; } return accumulatedValue - entry.Value; }); }
private static void EnsureCommonOperatorPreConditionsAreSatisfied( Money value1, Money value2) { ESInv.DBC.Ensure.That(value1 != null, "value 1 cannot be null"); ESInv.DBC.Ensure.That(value2 != null, "value 2 cannot be null"); ESInv.DBC.Ensure.That(value1.Currency == value2.Currency, "Currencies must be the same"); }