Skip to content

Changing the application name

JFBlouin edited this page Apr 10, 2019 · 3 revisions

You can customize you application by providing information (such as a name) that will be printed in help.


Using Parser.Configuration.Program

The name can be changed by using the Program property on Action<Parser.Configuration> configurationBuilder.

This attribute accepts the following values, all of which are optional:

Property Use
Name Allows you to specify the name of the program.
Description Allows you to specify a description.
HelpUrl Allows you to specify a URL for more information.

If name is not specified, description and URL will not be displayed in help.


Sample

static void Main(string[] args)
{
	CommandLineEngine.CommandExecutor.Execute(args, configurationBuilder: c =>
	{
		c.Program.Name = "Sample application";
		c.Program.Description = "This is a sample application";
		c.Program.HelpUrl = "https://github.com/blouin/CommandLineEngine";
	}
}

Clone this wiki locally