public void AssertExecuteInBackground(string text) { parser.Reset(); parser.Append(text); Command command = parser.GetCommand(); if (command == null) { Assert.Fail("No such command: `{0}'", text); } ST.ThreadPool.QueueUserWorkItem(delegate { try { object result = command.Execute(engine.Interpreter); Interpreter.AddEvent(new DebuggerEvent(DebuggerEventType.CommandDone, result)); } catch (Exception ex) { Interpreter.AddEvent(new DebuggerEvent(DebuggerEventType.CommandDone, ex)); } }); }