共用方式為


Option.AddValidator(ValidateSymbolResult<OptionResult>) 方法

定義

加入驗證程式,當剖析器比對選項時,將會呼叫這個驗證器。

public:
 void AddValidator(System::CommandLine::Parsing::ValidateSymbolResult<System::CommandLine::Parsing::OptionResult ^> ^ validate);
public void AddValidator (System.CommandLine.Parsing.ValidateSymbolResult<System.CommandLine.Parsing.OptionResult> validate);
member this.AddValidator : System.CommandLine.Parsing.ValidateSymbolResult<System.CommandLine.Parsing.OptionResult> -> unit
Public Sub AddValidator (validate As ValidateSymbolResult(Of OptionResult))

參數

validate
ValidateSymbolResult<OptionResult>

ValidateSymbolResult<T>用來驗證OptionResult剖析期間產生的委派。

適用於