Пример #1
0
        internal string UsageDetail()
        {
            StringBuilder Expression = new StringBuilder($"\r\n{Description}");

            if (HasDefaultMode)
            {
                Expression.Append($"{Samples.Mode}\r\n{UsageExpression.AvailableModes}:");
                SupportedModes.ForEach(p => Expression.Append(p.ShowDescription(SupportedModes.Select(q => q.Name).GetPadding())));
            }

            return(Expression.ToString());
        }
Пример #2
0
        internal string MarkdownDetail()
        {
            bool          hasDefaultMode = SupportedModes.Count == 1;
            StringBuilder Expression     = new StringBuilder($"\r\n## {Name} Command\r\n");

            if (!hasDefaultMode)
            {
                Expression.AppendLine($"{Description}\r\n\r\n**{Usage(false, true)}**\r\n");
                Expression.AppendLine(MarkdownExpression.SupportedModes);
            }
            SupportedModes.ForEach(p => Expression.AppendLine(p.Markdown(Name, hasDefaultMode)));
            return(Expression.ToString());
        }