public Banknote[] CashOut(CurrencyType c, uint v) { var result = _handler.CashOut(c, ref v); if (v > 0) { throw new Exception("Введена невалидная сумма"); } return(result); }
public Dictionary <string, int> CashOut(int sum, string currency) { Dictionary <string, int> moneyToCashOut = new Dictionary <string, int>() { { "100$", 0 }, { "50$", 0 }, { "10$", 0 }, { "10RUB", 0 } }; return(_handler.CashOut(sum, currency, moneyToCashOut)); }
public virtual Dictionary <string, int> CashOut(int sum, string currency, Dictionary <string, int> moneyToCashOut) { if (_nextHandler == null && sum != 0) { Console.WriteLine($"Осталось на балансе: { sum } {currency}"); return(moneyToCashOut); } else if (_nextHandler == null) { return(moneyToCashOut); } else { return(_nextHandler.CashOut(sum, currency, moneyToCashOut)); } }
public virtual bool CashOut(string sum, int deepth) { return(_nextHandler != null && _nextHandler.CashOut(sum, 0)); }
public bool CashOut(string sum) { Console.Write(sum + " = "); return(_handler.CashOut(sum, 0)); }
public virtual bool CashOut(int cash, CurrencyType currency) { return(_nextHandler != null && _nextHandler.CashOut(cash, currency)); }
public bool CashOut(int cash, CurrencyType currency) { return(_handler.CashOut(cash, currency)); }