public AtmViewModel(Atm atm) { _atm = atm; _repository = new AtmRepository(); _paymentGateway = new PaymentGateway(); TakeMoneyCommand = new Command<decimal>(x => x > 0, TakeMoney); }
public AtmViewModel(Atm atm, IAtmRepository repository, EventDispatcher eventDispatcher) { _atm = atm; _repository = repository; _eventDispatcher = eventDispatcher; _paymentGateway = new PaymentGateway(); TakeMoneyCommand = new Command<decimal>(x => x > 0, TakeMoney); }