Esempio n. 1
0
        private void WriteArgument(ArgumentHelp argumentHelp, int longestNameWidth, int longestAliasWidth, int descriptionWidth, int leftWidth)
        {
            var name        = $"-{argumentHelp.PropertyName}".PadRight(longestNameWidth);
            var aliasString = $"[{argumentHelp.AliasString}]".PadRight(longestAliasWidth);

            Console.Write(name, GetNameForeground(argumentHelp));
            Console.Write(aliasString);

            var descriptionLines = GetWrappedStrings(argumentHelp.Description, descriptionWidth).ToList();

            Console.WriteLine(descriptionLines[0]);
            foreach (var part in descriptionLines.Skip(1))
            {
                Console.WriteLine(" ".PadLeft(leftWidth) + part);
            }
        }
Esempio n. 2
0
 protected virtual void BeforerArgument(ArgumentHelp help)
 {
 }
Esempio n. 3
0
 protected virtual ConsoleColor GetNameForeground(ArgumentHelp info)
 {
     return(info.Required ? ConsoleColor.Red : Console.ForegroundColor);
 }
Esempio n. 4
0
 protected virtual void AfterArgument(ArgumentHelp help)
 {
 }