示例#1
0
        private static void Main(string[] args)
        {
            var console = new CommandEngine.Console();

            console.Output += value => WriteLine(FormatOutput(value));

            console.Add(new PrintCommand());

            while (true)
            {
                try
                {
                    console.Parse(ReadLine());
                }
                catch (Exception e)
                {
                    WriteLine(FormatOutput(e.Message));
                }
            }
        }
示例#2
0
 public void CleanUpTest()
 {
     testConsole = null;
 }
示例#3
0
 public void InitializeTest()
 {
     testConsole         = new CommandEngine.Console();
     testConsole.Output += (output) => System.Console.WriteLine(output);
 }