CommandLineBuilderExtensions.UseVersionOption Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseVersionOption(CommandLineBuilder) |
Enables the use of a option (defaulting to the alias |
UseVersionOption(CommandLineBuilder, String[]) |
Enables the use of a option (defaulting to the alias |
UseVersionOption(CommandLineBuilder)
Enables the use of a option (defaulting to the alias --version
) which when specified in command line input will short circuit normal command handling and instead write out version information before exiting.
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Builder::CommandLineBuilder ^ UseVersionOption(System::CommandLine::Builder::CommandLineBuilder ^ builder);
public static System.CommandLine.Builder.CommandLineBuilder UseVersionOption (this System.CommandLine.Builder.CommandLineBuilder builder);
static member UseVersionOption : System.CommandLine.Builder.CommandLineBuilder -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseVersionOption (builder As CommandLineBuilder) As CommandLineBuilder
Parameters
- builder
- CommandLineBuilder
A command line builder.
Returns
The same instance of CommandLineBuilder.
Applies to
UseVersionOption(CommandLineBuilder, String[])
Enables the use of a option (defaulting to the alias --version
) which when specified in command line input will short circuit normal command handling and instead write out version information before exiting.
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Builder::CommandLineBuilder ^ UseVersionOption(System::CommandLine::Builder::CommandLineBuilder ^ builder, ... cli::array <System::String ^> ^ aliases);
public static System.CommandLine.Builder.CommandLineBuilder UseVersionOption (this System.CommandLine.Builder.CommandLineBuilder builder, params string[] aliases);
static member UseVersionOption : System.CommandLine.Builder.CommandLineBuilder * string[] -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseVersionOption (builder As CommandLineBuilder, ParamArray aliases As String()) As CommandLineBuilder
Parameters
- builder
- CommandLineBuilder
A command line builder.
- aliases
- String[]
One or more aliases to use instead of the default to signal that version information should be displayed.
Returns
The same instance of CommandLineBuilder.