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(); } }
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); } }
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(); } }
public void StartReadingCommands() { while (true) { OutputWriter.WriteMessage($"{SessionData.CurrentPath}>"); var inputLine = Console.ReadLine().Trim(); if (inputLine == endCommand) { break; } this.interpreter.InterpretCommand(inputLine); } }
public static void StartReadingCommnads() { while (true) { OutputWriter.WriteMessage($"{SessionData.CurrentPath}> "); string input = Console.ReadLine(); input = input.Trim(); if (input == endCommand) { break; } CommandInterpreter.InterpredCommand(input); } }
/// <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); } }
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}>"); } }