Example #1
0
        public bool Equals(MoneyValue <V> v)
        {
            if (v == null)
            {
                return(false);
            }

            return(IsEquals(v));
        }
Example #2
0
 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;
 }
Example #3
0
 private bool IsEquals(MoneyValue <V> v)
 {
     return((faceValue == v.faceValue) && (currencySymbol == v.currencySymbol) &&
            (currencyConversionMultiplier == v.currencyConversionMultiplier));
 }
Example #4
0
 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); };
 }
Example #5
0
 public Money(MoneyValue <V> v) : this(v.faceValue, v.currencySymbol, null)
 {
 }