コード例 #1
0
        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)));
        }
コード例 #4
0
 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());
        }
コード例 #8
0
 private Option <string> QueryValueFromUser(IUserInputDescription variable)
 => ValidatedUserInput
 .GetValidatedValue(variable, RequesterValidations(variable))
 .SelectMany(input => IndexToValue(input, variable));