Class CommandMetadata
- Assembly
- McMaster.Extensions.CommandLineUtils.dll
Metadata about a command from the [Command] attribute.
public sealed class CommandMetadata
- Inheritance
-
objectCommandMetadata
Properties
AdditionalNames
Additional names/aliases for the command.
public string[]? AdditionalNames { get; init; }
Property Value
- string[]
AllowArgumentSeparator
Whether to allow '--' to stop parsing arguments.
public bool? AllowArgumentSeparator { get; init; }
Property Value
- bool?
ClusterOptions
Whether options can be clustered behind one '-' delimiter.
public bool? ClusterOptions { get; init; }
Property Value
- bool?
Description
A description of the command.
public string? Description { get; init; }
Property Value
ExtendedHelpText
Additional text that appears at the bottom of generated help text.
public string? ExtendedHelpText { get; init; }
Property Value
FullName
The full name of the command to show in help text.
public string? FullName { get; init; }
Property Value
Name
The primary name of the command.
public string? Name { get; init; }
Property Value
OptionsComparison
The way arguments and options are matched.
public StringComparison? OptionsComparison { get; init; }
Property Value
ParseCulture
The culture used to convert values into types.
public CultureInfo? ParseCulture { get; init; }
Property Value
ResponseFileHandling
How to handle response files.
public ResponseFileHandling? ResponseFileHandling { get; init; }
Property Value
ShowInHelpText
Whether this command appears in generated help text.
public bool ShowInHelpText { get; init; }
Property Value
UnrecognizedArgumentHandling
How to handle unrecognized arguments.
public UnrecognizedArgumentHandling? UnrecognizedArgumentHandling { get; init; }
Property Value
UsePagerForHelpText
Whether a Pager should be used to display help text.
public bool? UsePagerForHelpText { get; init; }
Property Value
- bool?
Methods
ApplyTo(CommandLineApplication)
Applies this metadata to a command line application.
public void ApplyTo(CommandLineApplication app)
Parameters
appCommandLineApplicationThe application to configure.