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))); }
private Option <string> QueryValueFromUser(IUserInputDescription variable) => ValidatedUserInput.GetValidatedValue(variable, RequesterValidations(variable));
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>());
private Option <double> QueryValueFromUser(IUserInputDescription variable) => ValidatedUserInput .GetValidatedValue(variable, RequesterValidations(variable)) .SelectMany(ToDouble);
protected override string InteractiveQuery(IUserInputDescription variable) { ValidatedUserInput.WriteQuestion(variable, "Please enter a valid double number for '{0}':"); return(Retry(() => QueryValueFromUser(variable)).ToString(CultureInfo.InvariantCulture)); }
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));