Table of Contents

Class ArgumentAttribute

Namespace
McMaster.Extensions.CommandLineUtils
Assembly
McMaster.Extensions.CommandLineUtils.dll

Represents one or many positional command line arguments. Arguments are parsed based the Order given.

[AttributeUsage(AttributeTargets.Property)]
public sealed class ArgumentAttribute : Attribute
Inheritance
object
Attribute
ArgumentAttribute

Constructors

ArgumentAttribute(int)

Initializes a new ArgumentAttribute.

public ArgumentAttribute(int order)

Parameters

order int

The order

ArgumentAttribute(int, string?)

Initializes a new ArgumentAttribute.

public ArgumentAttribute(int order, string? name)

Parameters

order int

The order

name string

The name

ArgumentAttribute(int, string?, string?)

Initializes a new ArgumentAttribute.

public ArgumentAttribute(int order, string? name, string? description)

Parameters

order int

The order

name string

The name

description string

The description

Properties

Description

A description of the argument.

public string? Description { get; set; }

Property Value

string
See Also

Name

The name of the argument.

public string? Name { get; set; }

Property Value

string
See Also

Order

The order in which the argument is expected, relative to other arguments.

public int Order { get; set; }

Property Value

int

ShowInHelpText

Determines if the argument appears in the generated help-text.

public bool ShowInHelpText { get; set; }

Property Value

bool
See Also

See Also