示例#1
0
        static void Main()
        {
            var blah = new QueryExampleController(Environment.GetQueryProcessor());
            blah.ShowAllClients();

            Console.WindowHeight = 40;
            Console.WindowWidth = 120;

            PrintHelp();

            while (true)
            {
                Thread.Sleep(300);
                Console.Write("> ");

                var line = Console.ReadLine();

                if (string.IsNullOrWhiteSpace(line))
                {
                    continue;
                }

                var split = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

                TryHandleRequest(split);

                Console.WriteLine();
            }
        }
示例#2
0
        private static void TryHandleRequest(string[] split)
        {
            try
            {
                HandleRequest(split);

                var blah = new QueryExampleController(Environment.GetQueryProcessor());
                blah.ShowAllClients();
            }
            catch (Exception ex)
            {
                Environment.Logger.Fatal(ex.Message);
            }
        }