Пример #1
0
        /// <inheritdoc />
        public override Mixture AskPassword(string question, bool fallback = false)
        {
            var helperQuestion   = GetHelperQuestion();
            var questionInstance = new BaseQuestion(question);

            questionInstance.SetPassword(true);
            questionInstance.SetPasswordFallback(fallback);

            return(helperQuestion.Ask(Input, Output, questionInstance));
        }
Пример #2
0
        /// <inheritdoc />
        public override Mixture AskAndValidate(string question, Func <Mixture, Mixture> validator,
                                               int attempts = 0, Mixture defaultValue = null)
        {
            var helperQuestion   = GetHelperQuestion();
            var questionInstance = new BaseQuestion(question, defaultValue);

            questionInstance.SetMaxAttempts(attempts);
            questionInstance.SetValidator(validator);

            return(helperQuestion.Ask(Input, Output, questionInstance));
        }