private void OnMoneyLoaded(EventMoney.Money emn) { Money money = new Money(emn.TenRupeeCount, emn.TwentyRupeeCount, emn.FiftyRupeeCount, emn.HundredRupeeCount, emn.FiveHundredRupeeCount, emn.HundredRupeeCount); _vendingMachine.LoadMoney(money); MoneyInMachine = _vendingMachine.MoneyInMachine; }
public void LoadMoney() { Money mn = new Money(TenRupeeNotes, TwentyRupeeNotes, FiftyRupeeNotes, HundredRupeeNotes, FiveHundredRupeeNotes, ThousandRupeeNotes); //Do mapping EventMoney.Money emn = new EventMoney.Money(TenRupeeNotes, TwentyRupeeNotes, FiftyRupeeNotes, HundredRupeeNotes, FiveHundredRupeeNotes, ThousandRupeeNotes); _vendingMachine.InsertMoney(mn); MoneyInMachine = _vendingMachine.MoneyInMachine; _repository.Save(_vendingMachine); _eventAggregator.GetEvent <MoneyLoadedEvent>().Publish(emn); }