static void Main(string[] args) { RegisterServices(); _sodaMachine = _serviceProvider.GetService <ISodaMachineLogic>(); userId = new Guid().ToString(); string userSelection = ""; Console.WriteLine("Welcome to our Soda Machine."); do { userSelection = ShowMenu(); switch (userSelection) { case "1": // Show Soda Price ShowSodaPrice(); break; case "2": // List Soda Options ListSodaOptions(); break; case "3": // Show Amount Deposited ShowAmountDeposited(); break; case "4": // Deposit Money DepositMoney(); break; case "5": // Cancel Transaction CancelTransaction(); break; case "6": // Request Soda RequestSoda(); break; case "9": // Close Machine // Don't do anything - allow this to go to the while, which will close the loop. break; default: // Don't do anything - allow this to go to the while, which will restart the loop. break; } Console.Clear(); } while (userSelection != "9"); Console.WriteLine("Thanks, have a nice day."); Console.WriteLine("Press return to quit..."); Console.ReadLine(); }
public SodaMachineModel(ISodaMachineLogic sodaMachine) { _sodaMachine = sodaMachine; }
public IndexModel(ISodaMachineLogic sodaMachineLogic) { _sodaMachineLogic = sodaMachineLogic; }
public CoinInventoryModel(ISodaMachineLogic sodaMachine) { this.sodaMachine = sodaMachine; }