Beispiel #1
0
        public static string Password(Action <PasswordOptions> configure)
        {
            var options = new PasswordOptions();

            configure(options);

            return(Password(options));
        }
Beispiel #2
0
        public static string Password(string message, string passwordChar = "*", string placeholder = default, IList <Func <object, ValidationResult> > validators = default)
        {
            var options = new PasswordOptions
            {
                Message      = message,
                Placeholder  = placeholder,
                PasswordChar = passwordChar
            };

            options.Validators.Merge(validators);

            return(Password(options));
        }
Beispiel #3
0
        public static string Password(string message, IList <Func <object, ValidationResult> > validators = null)
        {
            var options = new PasswordOptions
            {
                Message = message
            };

            if (validators != null)
            {
                foreach (var validator in validators)
                {
                    options.Validators.Add(validator);
                }
            }

            return(Password(options));
        }
Beispiel #4
0
        public static string Password(PasswordOptions options)
        {
            using var form = new PasswordForm(options);

            return(form.Start());
        }