コード例 #1
0
        private string GetCommandModeEntry(IEnumerable <string> commands, ref int commandIndex, IEnumerable <string> flags)
        {
            var entry = commands.ToList()[commandIndex++];

            if (commandIndex >= commands.Count())
            {
                if (HasFlag(flags, FlagContinueInConsoleMode))
                {
                    _commandMode = false;
                }
                else
                {
                    _running = false;
                }
            }

            _rootCommand.OutputInformation("Command {0}: {1}", commandIndex, entry);

            return(entry);
        }