Beispiel #1
0
 /// <summary>
 /// Case insensitive version for <see cref="System.CommandLine.OptionExtensions.FromAmong{TOption}(TOption, string[])"/>.
 /// </summary>
 internal static void FromAmongCaseInsensitive(this Option <string> option, string[]?allowedValues = null, string?allowedHiddenValue = null)
 {
     allowedValues ??= Array.Empty <string>();
     option.AddValidator(optionResult => ValidateAllowedValues(optionResult, allowedValues, allowedHiddenValue));
     option.AddCompletions(allowedValues);
 }