Пример #1
0
        public ICurrencyNotation GetClosestUnder(decimal value)
        {
            Notations = Notations.OrderBy(f => f.Value).ToList();
            ICurrencyNotation NearestNotation = null;

            foreach (var moneyEntry in Notations)
            {
                if (moneyEntry.Value > value)
                {
                    break;
                }
                if (moneyEntry.Available > 0)
                {
                    NearestNotation = moneyEntry;
                }
            }
            return(NearestNotation);
        }
Пример #2
0
 public void AddNotation(ICurrencyNotation notation)
 {
     Notations.Add(notation);
 }