private static void HandleKey(ConsoleKeyInfo keyInfo) { if (keyInfo.Key != ConsoleKey.Enter) { handler.Handle(keyInfo); } else { CLIOutput.WriteLine(); CLI.HandleQuery(handler.Text); ReadLine.AddHistory(handler.Text); CreateHandler(); } }
public static void Update() { if (handler == null) { CreateHandler(); } if (Console.KeyAvailable) { HandleKey(Console.ReadKey(true)); } CLI.UpdateTitle(); }