public bool Equals(MoneyValue <V> v) { if (v == null) { return(false); } return(IsEquals(v)); }
public Money(V v, Currency cur, USDConversionMultiplier usdConversionMultiplierDelegate) { if (usdConversionMultiplierDelegate != null) { usdConversionMultiplier = usdConversionMultiplierDelegate; } else { usdConversionMultiplier = new USDConversionMultiplier(DefaultUSDConversionMultiplier); } this.monetaryValue = new MoneyValue <V>(v, cur, usdConversionMultiplier(cur)); //this.value = this.monetaryValue; //JJHACK: so that GetValue() works without casting this.monetaryExpression = null; }
private bool IsEquals(MoneyValue <V> v) { return((faceValue == v.faceValue) && (currencySymbol == v.currencySymbol) && (currencyConversionMultiplier == v.currencyConversionMultiplier)); }
public void SetValue(MoneyValue <V> value) { monetaryValue = value; //this.value = this.monetaryValue; //JJHACK: so that GetValue() works without casting usdConversionMultiplier = delegate(Currency c) { return(value.currencyConversionMultiplier); }; }
public Money(MoneyValue <V> v) : this(v.faceValue, v.currencySymbol, null) { }