Niche.CommandLineProcessor 3.1.4

Niche CommandLine Processor

Convention based argument handling for console applications.

Install-Package Niche.CommandLineProcessor -Version 3.1.4
dotnet add package Niche.CommandLineProcessor --version 3.1.4
<PackageReference Include="Niche.CommandLineProcessor" Version="3.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Niche.CommandLineProcessor --version 3.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Niche.CommandLine

Build status

A simple convention based argument handler to make it easy for .NET developers to write console applications.

Conventions

Commandline options are declared by writing methods that comply with the appropriate convention (see below for examples).

Each option has a short form starting with a single dash - (e.g.: -f, -h or -rs) and a long form starting with a
double dash -- (e.g.: --find, --help or --report-status). These names are derived from the names of the
implementing methods (e.g.: Find(), Help() or ReportStatus()).

Switches

To define a switch, declare a method with no return and no parameters. Give it a [Description] attribute to document
what the switch does.

For example, this method:

[Description("Show help listing all available options")]
public void Help();

will give the options -h and --help.

Parameters

To define a parameter, declare a method with no return and one parameter. Again, give it a [Description] attribute to
document what the option does.

For example, this method:

[Description("Find files that match a wildcard")]
public void Find(string wildcard);

will give the options -f &lt;wildcard&gt; and --find &lt;wildcard&gt;.

Modes

To define a whole new mode, declare a method returning a new driver instance that has no parameters. Again, you "opt-in"
by giving it a [Description] attribute to document what the mode does.

For example, this method:

[Description("Compare the results of two compilers between systems")]
public CompilerDriver TestCompiler();

declares a mode test-compiler.

See Mode Support for more
information.

Niche.CommandLine

Build status

A simple convention based argument handler to make it easy for .NET developers to write console applications.

Conventions

Commandline options are declared by writing methods that comply with the appropriate convention (see below for examples).

Each option has a short form starting with a single dash - (e.g.: -f, -h or -rs) and a long form starting with a
double dash -- (e.g.: --find, --help or --report-status). These names are derived from the names of the
implementing methods (e.g.: Find(), Help() or ReportStatus()).

Switches

To define a switch, declare a method with no return and no parameters. Give it a [Description] attribute to document
what the switch does.

For example, this method:

[Description("Show help listing all available options")]
public void Help();

will give the options -h and --help.

Parameters

To define a parameter, declare a method with no return and one parameter. Again, give it a [Description] attribute to
document what the option does.

For example, this method:

[Description("Find files that match a wildcard")]
public void Find(string wildcard);

will give the options -f &lt;wildcard&gt; and --find &lt;wildcard&gt;.

Modes

To define a whole new mode, declare a method returning a new driver instance that has no parameters. Again, you "opt-in"
by giving it a [Description] attribute to document what the mode does.

For example, this method:

[Description("Compare the results of two compilers between systems")]
public CompilerDriver TestCompiler();

declares a mode test-compiler.

See Mode Support for more
information.

Version History

Version Downloads Last updated
3.1.4 305 1/20/2018
3.1.3 230 1/11/2018
3.1.2 259 12/10/2017
3.1.1 242 12/9/2017
3.1.0 242 12/9/2017
3.0.4 263 11/23/2017
2.0.52 245 7/9/2017
2.0.46 430 10/11/2016
2.0.45 286 9/20/2016
2.0.44 286 9/20/2016
2.0.34 533 4/21/2015
2.0.33 410 1/27/2015
2.0.31 421 1/22/2015
2.0.30 383 1/3/2015
2.0.29 391 12/16/2014
2.0.28 386 12/16/2014
2.0.27 372 12/16/2014
2.0.26 502 11/23/2014
2.0.25 500 11/23/2014
2.0.24 517 11/23/2014
2.0.23 557 11/23/2014
1.0.22 442 8/24/2014
1.0.21 422 8/22/2014
1.0.20 397 8/10/2014
1.0.19 391 8/9/2014
1.0.17 408 8/7/2014
1.0.16 408 8/5/2014