Argument.SetDefaultValueFactory Method
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.
Overloads
SetDefaultValueFactory(Func<ArgumentResult,Object>) |
Sets a delegate to invoke when the default value for the argument is required. |
SetDefaultValueFactory(Func<Object>) |
Sets a delegate to invoke when the default value for the argument is required. |
SetDefaultValueFactory(Func<ArgumentResult,Object>)
Sets a delegate to invoke when the default value for the argument is required.
public:
void SetDefaultValueFactory(Func<System::CommandLine::Parsing::ArgumentResult ^, System::Object ^> ^ getDefaultValue);
public void SetDefaultValueFactory (Func<System.CommandLine.Parsing.ArgumentResult,object?> getDefaultValue);
member this.SetDefaultValueFactory : Func<System.CommandLine.Parsing.ArgumentResult, obj> -> unit
Public Sub SetDefaultValueFactory (getDefaultValue As Func(Of ArgumentResult, Object))
Parameters
- getDefaultValue
- Func<ArgumentResult,Object>
The delegate to invoke to return the default value.
Remarks
In this overload, the ArgumentResult is provided to the delegate.
Applies to
SetDefaultValueFactory(Func<Object>)
Sets a delegate to invoke when the default value for the argument is required.
public:
void SetDefaultValueFactory(Func<System::Object ^> ^ getDefaultValue);
public void SetDefaultValueFactory (Func<object?> getDefaultValue);
member this.SetDefaultValueFactory : Func<obj> -> unit
Public Sub SetDefaultValueFactory (getDefaultValue As Func(Of Object))
Parameters
Exceptions
Thrown when getDefaultValue
is null.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za