CommandLineBuilderExtensions.UseVersionOption 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseVersionOption(CommandLineBuilder) |
啟用選項 (預設為別名 |
UseVersionOption(CommandLineBuilder, String[]) |
啟用選項 (預設為別名 |
UseVersionOption(CommandLineBuilder)
啟用選項 (預設為別名 --version
) ,在命令行輸入中指定的選項會縮短正常命令處理,並改為在結束之前寫出版本資訊。
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
參數
- builder
- CommandLineBuilder
命令行產生器。
傳回
的相同實例 CommandLineBuilder。
適用於
UseVersionOption(CommandLineBuilder, String[])
啟用選項 (預設為別名 --version
) ,在命令行輸入中指定的選項會縮短正常命令處理,並改為在結束之前寫出版本資訊。
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
參數
- builder
- CommandLineBuilder
命令行產生器。
- aliases
- String[]
一或多個要使用的別名,而不是預設值,表示應該顯示版本資訊。
傳回
的相同實例 CommandLineBuilder。