Add single-string variants to CommandSet construction

This commit is contained in:
Matt Nadareski
2025-10-05 22:41:18 -04:00
parent e26a222755
commit a0576df3ee

View File

@@ -46,6 +46,15 @@ namespace SabreTools.CommandLine
/// </summary>
public CommandSet() { }
/// <summary>
/// Create a new CommandSet with a printable header
/// </summary>
/// <param name="header">Custom commandline header to be printed when outputting help</param>
public CommandSet(string header)
{
_header.Add(header);
}
/// <summary>
/// Create a new CommandSet with a printable header
/// </summary>
@@ -55,6 +64,17 @@ namespace SabreTools.CommandLine
_header.AddRange(header);
}
/// <summary>
/// Create a new CommandSet with a printable header
/// </summary>
/// <param name="header">Custom commandline header to be printed when outputting help</param>
/// <param name="footer">Custom commandline footer to be printed when outputting help</param>
public CommandSet(string header, string footer)
{
_header.Add(header);
_footer.Add(footer);
}
/// <summary>
/// Create a new CommandSet with a printable header
/// </summary>