Argument<T>.DefaultValueFactory Property

Definition

The delegate to invoke to create the default value.

public:
 property Func<System::CommandLine::Parsing::ArgumentResult ^, T> ^ DefaultValueFactory { Func<System::CommandLine::Parsing::ArgumentResult ^, T> ^ get(); void set(Func<System::CommandLine::Parsing::ArgumentResult ^, T> ^ value); };
public Func<System.CommandLine.Parsing.ArgumentResult,T>? DefaultValueFactory { get; set; }
member this.DefaultValueFactory : Func<System.CommandLine.Parsing.ArgumentResult, 'T> with get, set
Public Property DefaultValueFactory As Func(Of ArgumentResult, T)

Property Value

Remarks

It's invoked when there was no parse input provided for given Argument. The same instance can be set as CustomParser, in such case the delegate is also invoked when an input was provided.

Applies to