Exemplo n.º 1
0
 public void HandleUserInput()
 {
     while (true)
     {
         var      userSelection = ShowOptionsMenuToCustomer();
         ICommand command       = ParseUserInput(userSelection);
         if (command != null)
         {
             // TODO: use state here
             if (command is AddMoneyCommand moneyCommand)
             {
                 outputHandler.WriteOutput("Please enter an amount to add:");
                 string input = Console.ReadLine();
                 int.TryParse(input, out int result);
                 moneyCommand.SetAmount(result);
                 command = moneyCommand;
             }
             SendCommandToController(command);
         }
     }
 }
 public void _SenderWritingOuptutData(List <string> OutputDataParameter)
 {
     _IOutputHandler.WriteOutput(OutputDataParameter);
 }
Exemplo n.º 3
0
 public void WriteOuptutData(List <string> OutputDataParameter)
 {
     OutputHandler.WriteOutput(OutputDataParameter);
 }