ConsoleString BuildArgumentDetail(FormattedArgument formattedArgument, int maxArgumentNameLength, int maxArgumentTypeLength) { var argumentDetail = new ConsoleString(); argumentDetail += " "; argumentDetail += formattedArgument .DisplayName .PadRight(maxArgumentNameLength); argumentDetail += " "; argumentDetail += formattedArgument .DisplayType .PadRight(maxArgumentTypeLength); argumentDetail += " "; argumentDetail += formattedArgument.Argument.Description; if (formattedArgument.Argument.IsFulfilled == false) { argumentDetail = argumentDetail.Colored(foreground: ConsoleColor.Red); } return(argumentDetail); }
ConsoleString BuildArgumentSyntax(FormattedArgument formattedArgument) { var argumentSyntax = new ConsoleString(); if (formattedArgument.Argument.IsParams) { argumentSyntax += formattedArgument.DisplayName; } else if (formattedArgument.Argument.IsOptional) { argumentSyntax += "[" + formattedArgument.DisplayName + formattedArgument.DisplayType + "]"; } else { argumentSyntax += formattedArgument.DisplayName + " " + formattedArgument.DisplayType; } if (formattedArgument.Argument.IsFulfilled == false) { argumentSyntax = ("!" + argumentSyntax + "!").Colored(foreground: ConsoleColor.Red); } return(argumentSyntax); }