public ICommand ParseCommands()
{
IList<ICommand> commands = new List<ICommand>();
IList<ICommand> currentHoistedCommands = this.hoistedCommands;
try
{
this.hoistedCommands = new List<ICommand>();
for (ICommand cmd = this.ParseCommand(); cmd != null; cmd = this.ParseCommand())
this.AddCommand(commands, cmd);
return new CompositeCommand(this.hoistedCommands, commands);
}
finally
{
this.hoistedCommands = currentHoistedCommands;
}
}