示例#1
0
 public Section(ArgumentSetHelpSectionType type, ArgumentSetHelpOptions options, ArgumentMetadataHelpOptions itemOptions, IEnumerable <ColoredMultistring> entries, string name = null)
 {
     SectionType        = type;
     Entries            = entries.ToList();
     Name               = name ?? itemOptions.HeaderTitle;
     BodyIndentWidth    = itemOptions.BlockIndent.GetValueOrDefault(options.SectionEntryBlockIndentWidth);
     HangingIndentWidth = itemOptions.HangingIndent.GetValueOrDefault(options.SectionEntryHangingIndentWidth);
 }
示例#2
0
 public Section(ArgumentSetHelpSectionType type, ArgumentSetHelpOptions options, ArgumentMetadataHelpOptions itemOptions, ColoredString entry)
     : this(type, options, itemOptions, new[] { entry })
 {
 }
示例#3
0
 public Section(ArgumentSetHelpSectionType type, ArgumentSetHelpOptions options, ArgumentMetadataHelpOptions itemOptions, IEnumerable <string> entries)
     : this(type, options, itemOptions, entries.Select(e => (ColoredString)e))
 {
 }
示例#4
0
 /// <summary>
 /// Basic constructor.
 /// </summary>
 /// <param name="options">Help options.</param>
 public ArgumentSetHelpRenderer(ArgumentSetHelpOptions options)
 {
     _options = options;
 }
 /// <summary>
 /// Construct a fluent builder from options.
 /// </summary>
 /// <param name="options">Options.</param>
 /// <returns>Fluent builder.</returns>
 public static FluentBuilder <ArgumentSetHelpOptions> With(this ArgumentSetHelpOptions options) =>
 new FluentBuilder <ArgumentSetHelpOptions>(options);