Class CommandLineOptionAttribute
Defines an option for a ICommandLineTool.
Inherited Members
Namespace: DevToys.Api
Assembly: DevToys.Api.dll
Syntax
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CommandLineOptionAttribute : CommandNameAttribute
Properties
Alias
Gets or sets the alias name of the option. Example, "f". Implicitly, an option named "f" will be usable in a command line through "-f <value>".
Declaration
public string Alias { get; set; }
Property Value
Type | Description |
---|---|
string |
IsRequired
Gets or sets whether the option is required.
Declaration
public bool IsRequired { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets the name of the option. Example, "file". Implicitly, an option named "file" will be usable in a command line through "--file <value>".
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |