예제 #1
0
        public CurrencyDecorator <double>[] ToDecorators()
        {
            var decs = new CurrencyDecorator <double> [_currencies.Count];
            int i    = 0;

            foreach (var currency in _currencies)
            {
                decs[i++] = new CurrencyDecorator <double>(currency.Key, currency.Value);
            }

            return(decs);
        }
예제 #2
0
 public Result <bool> Add(CurrencyDecorator decorator)
 {
     return(Add(decorator.currency, decorator.amount));
 }
예제 #3
0
 public Result <bool> Remove(CurrencyDecorator <double> decorator)
 {
     return(Remove(decorator.currency, decorator.amount));
 }
예제 #4
0
 public bool Equals(CurrencyDecorator other)
 {
     return base.Equals(other);
 }