예제 #1
0
 public Bancomat()
 {
     // Banknote value ascending order please ^_^
     _handler = new TenRubleHandler(null);
     _handler = new TenDollarHandler(_handler);
     _handler = new FiftyDollarHandler(_handler);
     _handler = new HundredDollarHandler(_handler);
 }
예제 #2
0
 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));
 }
예제 #3
0
 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)
 {
 }
예제 #5
0
 public TwentyEuroHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #6
0
 public BanknoteHandler Build(BanknoteHandler nextHandler)
 {
     return(new FiftyDollarHandler(nextHandler));
 }
예제 #7
0
 public FiftyDollarHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #8
0
 public TenDollarHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #9
0
 protected BanknoteHandler(BanknoteHandler nextHandler)
 {
     _nextHandler = nextHandler;
 }
 public TenEuroHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #11
0
 public void AssignNextChain(BanknoteHandler nextBanknote)
 {
     NextBanknote = nextBanknote;
 }
예제 #12
0
 protected TwoThousandRublesHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
 public BanknoteHandler Build(BanknoteHandler nextHandler)
 {
     return(new HundredDollarHandler(nextHandler));
 }
예제 #14
0
 public Bancomat(BanknoteHandler banknoteHandler)
 {
     _handler = banknoteHandler;
 }
예제 #15
0
 protected DollarsHandlerBase(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
 protected FiftyRublesHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
 public FiveEuroHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #18
0
 protected EuroHandlerBase(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #19
0
 protected RubleHandlerBase(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #20
0
 public ThousandRubleHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
 public HundredDollarHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #22
0
 public FiftyRubleHandler(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
예제 #23
0
 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)
 {
 }
예제 #28
0
 public BanknoteHandler Build(BanknoteHandler nextHandler)
 {
     return(new TenRubleHandler(nextHandler));
 }