Esempio n. 1
0
        public void StartReadingCommands()
        {
            OutputWriter.WriteMessage($"{SessionData.currentPath}> ");
            string input = Console.ReadLine();

            input = input.Trim();

            while (!input.Equals(EndCommand))
            {
                this.interpreter.InterpretCommand(input);
                OutputWriter.WriteMessage($"{SessionData.currentPath}> ");
                input = Console.ReadLine();
                input = input.Trim();
            }
        }
Esempio n. 2
0
 public void StartReadingCommands()
 {
     while (true)
     {
         //Interpret command
         OutputWriter.WriteMessage($"{SessionData.currentPath}> ");
         string input = Console.ReadLine();
         input = input.Trim();
         if (input == endCommand)
         {
             break;
         }
         this.interpreter.InterpretCommand(input);
     }
 }
Esempio n. 3
0
        public void StartReadingCommands()
        {
            OutputWriter.WriteMessage($"{SessionData.CurrentPath}> ");
            var input = Console.ReadLine();

            while (input != null && input.ToLower() != EndCommand)
            {
                var inputCommand = input.Trim().ToLower();
                interpreter.InterpretCommand(inputCommand);

                OutputWriter.WriteEmptyLine();
                OutputWriter.WriteMessage($"{SessionData.CurrentPath}> ");
                input = Console.ReadLine();
            }
        }
Esempio n. 4
0
        public void StartReadingCommands()
        {
            while (true)
            {
                OutputWriter.WriteMessage($"{SessionData.CurrentPath}>");
                var inputLine = Console.ReadLine().Trim();

                if (inputLine == endCommand)
                {
                    break;
                }

                this.interpreter.InterpretCommand(inputLine);
            }
        }
Esempio n. 5
0
        public static void StartReadingCommnads()
        {
            while (true)
            {
                OutputWriter.WriteMessage($"{SessionData.CurrentPath}> ");
                string input = Console.ReadLine();
                input = input.Trim();

                if (input == endCommand)
                {
                    break;
                }

                CommandInterpreter.InterpredCommand(input);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Starts reading commands form the keyboard and sends them to the Interpreter
        /// </summary>
        public void StartReadingCommands()
        {
            //Keep interpreting commands while the program is running
            while (true)
            {
                OutputWriter.WriteMessage($"{SessionData.CurrentPath}> ");
                var input = Console.ReadLine().Trim();

                //If InterpredCommand returns false, it means the program should stop
                var stopLoop = !interpreter.InterpredCommand(input);

                if (stopLoop)
                {
                    break;
                }
            }
        }
Esempio n. 7
0
 public void StartReadingCommands()
 {
     while (true)
     {
         OutputWriter.WriteMessage($"{SessionData.currentPath}> ");
         string input = Console.ReadLine().Trim();
         if (input.Equals(endCommand))
         {
             break;
         }
         if (string.IsNullOrEmpty(input))
         {
             input = Console.ReadLine().Trim();
             continue;
         }
         this.interpreter.InterpredCommand(input);
     }
 }
Esempio n. 8
0
        public void StartReadingCommands()
        {
            OutputWriter.WriteMessage($"{SessionData.CurrentPath}>");

            string input;

            while ((input = Console.ReadLine()) != EndCommand)
            {
                if (string.IsNullOrWhiteSpace(input))
                {
                    continue;
                }

                input = input.Trim();

                this.interpreter.InterpretCommand(input);
                OutputWriter.WriteMessage($"{SessionData.CurrentPath}>");
            }
        }