Argument<T>.DefaultValueFactory Property
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.
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.