Esempio n. 1
0
 public PasswordRecoverException(ForgotPasswordStep forgotPasswordStep, string message)
     : base(HttpStatusCode.BadRequest, message)
 {
     ForgotPasswordStep = forgotPasswordStep;
 }
        /// <summary>
        /// throw password recovery exception
        /// </summary>
        /// <param name="errorMessages"></param>
        /// <param name="step"></param>
        private void ThrowPasswordRecoverException(IEnumerable <string> errorMessages, ForgotPasswordStep step)
        {
            var builder = new StringBuilder();

            foreach (var identityError in errorMessages)
            {
                builder.Append(identityError);
                builder.AppendLine();
            }

            throw new PasswordRecoverException(step, builder.ToString());
        }