ArgumentValidation.AcceptOnlyFromAmong<T> 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.
Configures the argument to accept only the specified values, and to suggest them as command line completions.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Argument<T> ^ AcceptOnlyFromAmong(System::CommandLine::Argument<T> ^ argument, ... cli::array <System::String ^> ^ values);
public static System.CommandLine.Argument<T> AcceptOnlyFromAmong<T>(this System.CommandLine.Argument<T> argument, params string[] values);
static member AcceptOnlyFromAmong : System.CommandLine.Argument<'T> * string[] -> System.CommandLine.Argument<'T>
<Extension()>
Public Function AcceptOnlyFromAmong(Of T) (argument As Argument(Of T), ParamArray values As String()) As Argument(Of T)
Type Parameters
- T
Parameters
- argument
- Argument<T>
The argument to configure.
- values
- String[]
The values that are allowed for the argument.