共用方式為


CommandLineBuilderExtensions.UseDefaults(CommandLineBuilder) 方法

定義

使用預設組態。

public:
[System::Runtime::CompilerServices::Extension]
 static System::CommandLine::Builder::CommandLineBuilder ^ UseDefaults(System::CommandLine::Builder::CommandLineBuilder ^ builder);
public static System.CommandLine.Builder.CommandLineBuilder UseDefaults (this System.CommandLine.Builder.CommandLineBuilder builder);
static member UseDefaults : System.CommandLine.Builder.CommandLineBuilder -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseDefaults (builder As CommandLineBuilder) As CommandLineBuilder

參數

builder
CommandLineBuilder

命令行產生器。

傳回

的相同實例 CommandLineBuilder

備註

呼叫這個方法相當於呼叫:

builder
  .UseVersionOption()
  .UseHelp()
  .UseEnvironmentVariableDirective()
  .UseParseDirective()
  .UseSuggestDirective()
  .RegisterWithDotnetSuggest()
  .UseTypoCorrections()
  .UseParseErrorReporting()
  .UseExceptionHandler()
  .CancelOnProcessTermination();

適用於