OptionExtensions.FromAmong<TOption>(TOption, String[]) 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 an option to accept only the specified values, and to suggest them as command line completions.
public:
generic <typename TOption>
where TOption : System::CommandLine::Option[System::Runtime::CompilerServices::Extension]
static TOption FromAmong(TOption option, ... cli::array <System::String ^> ^ values);
public static TOption FromAmong<TOption> (this TOption option, params string[] values) where TOption : System.CommandLine.Option;
static member FromAmong : 'Option * string[] -> 'Option (requires 'Option :> System.CommandLine.Option)
<Extension()>
Public Function FromAmong(Of TOption As Option) (option As TOption, ParamArray values As String()) As TOption
Type Parameters
- TOption
The type of the option's parsed value.
Parameters
- option
- TOption
The option to configure.
- values
- String[]
The values that are allowed for the option.
Returns
TOption
The configured argument.
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.