예제 #1
0
        public virtual void AddItem(string name, string groupName, double expectedValue,
                                    CurrencyAbbrev c      = CurrencyAbbrev.USD, DateTime?atTime = null,
                                    TimeSpan?dueFrequency = null)
        {
            var amt = new Pecuniam(Convert.ToDecimal(expectedValue), c);

            AddItem(name, groupName, amt, atTime, dueFrequency);
        }
예제 #2
0
 public virtual void SetHistoricData(IEnumerable <Tuple <DateTime, decimal> > data, CurrencyAbbrev currency)
 {
     if (data == null || !data.Any())
     {
         return;
     }
     _historicData.Clear();
     foreach (var tuple in data)
     {
         if (_historicData.ContainsKey(tuple.Item1))
         {
             continue;
         }
         _historicData.Add(tuple.Item1, new Pecuniam(tuple.Item2, currency));
     }
 }
예제 #3
0
 public Currency(CurrencyAbbrev v)
 {
     _abbrev = v;
 }
예제 #4
0
 public Pecuniam(Decimal amount, CurrencyAbbrev c = CurrencyAbbrev.USD)
 {
     _amount   = amount;
     _currency = new Currency(c);
 }
예제 #5
0
 public Currency(CurrencyAbbrev v)
 {
     _abbrev = v;
 }
예제 #6
0
 public Pecuniam(Decimal amount, CurrencyAbbrev c = CurrencyAbbrev.USD)
 {
     _amount = amount;
     _currency = new Currency(c);
 }