Exemple #1
0
        private static string GetHelpText(string commandName = null, bool manual = false, bool includeValues = false)
        {
            if (commandName != null)
            {
                Command command = CommandLoader.LoadCommand(typeof(HelpCommand).Assembly, commandName);

                if (command == null)
                {
                    throw new ArgumentException($"Command '{commandName}' does not exist.", nameof(commandName));
                }

                return(HelpProvider.GetHelpText(command, includeValues));
            }
            else if (manual)
            {
                return(HelpProvider.GetManual(includeValues: includeValues));
            }
            else
            {
                return(HelpProvider.GetHelpText(includeValues: includeValues));
            }
        }