Ejemplo n.º 1
0
        public static string Password(Action <PasswordOptions> configure)
        {
            var options = new PasswordOptions();

            configure(options);

            return(Password(options));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 4
0
        public static string Password(PasswordOptions options)
        {
            using var form = new PasswordForm(options);

            return(form.Start());
        }