Class CommandAttribute
Represents a command line application using attributes to define options and arguments.
Inheritance
Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
[AttributeUsage(AttributeTargets.Class)]
public sealed class CommandAttribute : Attribute
Constructors
| Improve this Doc View SourceCommandAttribute()
Initializes a new CommandAttribute.
Declaration
public CommandAttribute()
CommandAttribute(String)
Initializes a new CommandAttribute.
Declaration
public CommandAttribute(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the command. |
Properties
| Improve this Doc View SourceAllowArgumentSeparator
Allow '--' to be used to stop parsing arguments. AllowArgumentSeparator
Declaration
public bool AllowArgumentSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Description
A description of the command. Description
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ExtendedHelpText
Additional text that appears at the bottom of generated help text. ExtendedHelpText
Declaration
public string ExtendedHelpText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FullName
The full name of the command line application to show in help text. FullName
Declaration
public string FullName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Name
The name of the command line application. When this is a subcommand, it is the name of the word used to invoke the subcommand. Name
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OptionsComparison
The way arguments and options are matched.
Declaration
public StringComparison OptionsComparison { get; set; }
Property Value
Type | Description |
---|---|
System.StringComparison |
ParseCulture
Specifies the culture used to convert values into types.
Declaration
public CultureInfo ParseCulture { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo |
ResponseFileHandling
Treat arguments beginning as '@' as a response file. ResponseFileHandling
Declaration
public ResponseFileHandling ResponseFileHandling { get; set; }
Property Value
Type | Description |
---|---|
ResponseFileHandling |
ShowInHelpText
Determines if this command appears in generated help text. ShowInHelpText
Declaration
public bool ShowInHelpText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ThrowOnUnexpectedArgument
Throw when unexpected arguments are encountered. ThrowOnUnexpectedArgument
Declaration
public bool ThrowOnUnexpectedArgument { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |