private CommandConfig ParseCommands(CommandConfig commandConfig, ArrayReader <string> argumentsReader) { while (argumentsReader.HasData() && ArgIsCommand(commandConfig, argumentsReader.Current())) { if (argumentsReader.HasData() && ArgIsCommand(commandConfig, argumentsReader.Current())) { commandConfig = GetSubCommandConfig(commandConfig, argumentsReader.Read()); } } InitBaseOptions(ref commandConfig); return(commandConfig); }