ExecuteOneCommand() public method

public ExecuteOneCommand ( string command ) : void
command string
return void
Example #1
0
        private void RunMainLoop()
        {
            ExecuteInitialCommand();

            while (!_context.ShouldQuit)
            {
                Console.Write(_context.Prompt);

                string command = "";
                while (true)
                {
                    string input = Console.ReadLine();
                    if (input.EndsWith(" _"))
                    {
                        Console.Write(">    ");
                        command += input.Substring(0, input.Length - 1);
                    }
                    else
                    {
                        command += input;
                        break;
                    }
                }

                _context.ExecuteOneCommand(command);
            }
        }