protected override string InteractiveQuery(IUserInputDescription variable)
        {
            AtLeastOneValueAvailable(variable);

            ValidatedUserInput.WriteQuestion(variable, "Please select one of the given values for '{0}':");
            WriteOptions(variable);

            return(Retry(() => QueryValueFromUser(variable)));
        }
Пример #2
0
 private Option <string> QueryValueFromUser(IUserInputDescription variable)
 => ValidatedUserInput.GetValidatedValue(variable, RequesterValidations(variable));
Пример #3
0
        protected override string InteractiveQuery(IUserInputDescription variable)
        {
            ValidatedUserInput.WriteQuestion(variable, "Please enter a valid path which already exists '{0}':");

            return(Retry(() => QueryValueFromUser(variable)));
        }
 private Option <string> QueryValueFromUser(IUserInputDescription variable)
 => ValidatedUserInput.GetValidatedValue(variable, Enumerable.Empty <IValidation>());
Пример #5
0
 private Option <double> QueryValueFromUser(IUserInputDescription variable)
 => ValidatedUserInput
 .GetValidatedValue(variable, RequesterValidations(variable))
 .SelectMany(ToDouble);
Пример #6
0
        protected override string InteractiveQuery(IUserInputDescription variable)
        {
            ValidatedUserInput.WriteQuestion(variable, "Please enter a valid double number for '{0}':");

            return(Retry(() => QueryValueFromUser(variable)).ToString(CultureInfo.InvariantCulture));
        }
Пример #7
0
        protected override string InteractiveQuery(IUserInputDescription variable)
        {
            ValidatedUserInput.WriteQuestion(variable, "Please enter a valid time for '{0}':");

            return(Retry(() => QueryValueFromUser(variable)).ToString());
        }
 private Option <string> QueryValueFromUser(IUserInputDescription variable)
 => ValidatedUserInput
 .GetValidatedValue(variable, RequesterValidations(variable))
 .SelectMany(input => IndexToValue(input, variable));