public Bancomat() { // Banknote value ascending order please ^_^ _handler = new TenRubleHandler(null); _handler = new TenDollarHandler(_handler); _handler = new FiftyDollarHandler(_handler); _handler = new HundredDollarHandler(_handler); }
public RubleATM() { handler = new LastBanknoteHandler(); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Ruble, 10)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Ruble, 50)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Ruble, 100)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Ruble, 1000)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Ruble, 5000)); }
public DollarATM() { handler = new LastBanknoteHandler(); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Dollar, 2)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Dollar, 5)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Dollar, 10)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Dollar, 20)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Dollar, 50)); handler = new DefaultBanknoteHandler(handler, new Banknote(Currency.Dollar, 100)); }
public FiveHundredRubleHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public TwentyEuroHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public BanknoteHandler Build(BanknoteHandler nextHandler) { return(new FiftyDollarHandler(nextHandler)); }
public FiftyDollarHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public TenDollarHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
protected BanknoteHandler(BanknoteHandler nextHandler) { _nextHandler = nextHandler; }
public TenEuroHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public void AssignNextChain(BanknoteHandler nextBanknote) { NextBanknote = nextBanknote; }
protected TwoThousandRublesHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public BanknoteHandler Build(BanknoteHandler nextHandler) { return(new HundredDollarHandler(nextHandler)); }
public Bancomat(BanknoteHandler banknoteHandler) { _handler = banknoteHandler; }
protected DollarsHandlerBase(BanknoteHandler nextHandler) : base(nextHandler) { }
protected FiftyRublesHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public FiveEuroHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
protected EuroHandlerBase(BanknoteHandler nextHandler) : base(nextHandler) { }
protected RubleHandlerBase(BanknoteHandler nextHandler) : base(nextHandler) { }
public ThousandRubleHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public HundredDollarHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public FiftyRubleHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public TwentyDollarsHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
protected FiveHundredRublesHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public TenRublesHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public TwoHundredEuroHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public FiftyHundredHandler(BanknoteHandler nextHandler) : base(nextHandler) { }
public BanknoteHandler Build(BanknoteHandler nextHandler) { return(new TenRubleHandler(nextHandler)); }