private void PrintCommand(int maxWidth, CommandAttribute commandAttribute) { // Write out the command name left justified with the max command's width's padding Console.Write(" {0, -" + maxWidth + "} ", GetCommandText(commandAttribute)); // Starting index of the description int descriptionPadding = maxWidth + 4; Console.PrintJustified(descriptionPadding, commandAttribute.Description); }
private static string GetCommandText(CommandAttribute commandAttribute) { return commandAttribute.CommandName + GetAltText(commandAttribute.AltName); }