示例#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();
            }
        }
示例#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);
     }
 }
示例#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();
            }
        }
示例#4
0
        public void StartReadingCommands()
        {
            while (true)
            {
                OutputWriter.WriteMessage($"{SessionData.CurrentPath}>");
                var inputLine = Console.ReadLine().Trim();

                if (inputLine == endCommand)
                {
                    break;
                }

                this.interpreter.InterpretCommand(inputLine);
            }
        }
示例#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);
            }
        }
示例#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;
                }
            }
        }
 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);
     }
 }
示例#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}>");
            }
        }