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

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