Ejemplo n.º 1
0
 private string GetErrorMessage(CreateAccountStatus status)
 {
     switch (status)
     {
         case CreateAccountStatus.DuplicateUserName:
             return Resources.ErrorMessages.DuplicateUserName;
         case CreateAccountStatus.DuplicateEmail:
             return Resources.ErrorMessages.DuplicateEmail;
         case CreateAccountStatus.InvalidUserName:
             return Resources.ErrorMessages.InvalidUserName;
         case CreateAccountStatus.InvalidPassword:
             return Resources.ErrorMessages.InvalidPassword;
         case CreateAccountStatus.InvalidEmail:
             return Resources.ErrorMessages.InvalidEmail;
         case CreateAccountStatus.InvalidAnswer:
             return Resources.ErrorMessages.InvalidAnswer;
         case CreateAccountStatus.InvalidQuestion:
             return Resources.ErrorMessages.InvalidQuestion;
         case CreateAccountStatus.ProviderError:
             return Resources.ErrorMessages.ProviderError;
         case CreateAccountStatus.UserRejected:
             return Resources.ErrorMessages.UserRejected;
         default:
             return Resources.ErrorMessages.UnknownError;
     }
 }
Ejemplo n.º 2
0
 public static string GetErrorMessage(CreateAccountStatus status)
 {
     switch (status)
     {
         case CreateAccountStatus.DuplicateUserName:
             return "<p>The username already exists. Please enter a different username.</p>";
         case CreateAccountStatus.DuplicateEmail:
             return "<p>A username for that email address already exists. Please enter a different email address.</p>";
         case CreateAccountStatus.InvalidUserName:
             return "<p>The user name provided is invalid. Please check the value and try again.</p>";
         case CreateAccountStatus.InvalidPassword:
             return "<p>The password provided is invalid. Please enter a valid password value.</p>";
         case CreateAccountStatus.InvalidEmail:
             return "<p>The email address provided is invalid. Please check the value and try again.</p>";
         case CreateAccountStatus.InvalidAnswer:
             return "<p>The password retrieval answer provided is invalid. Please check the value and try again.</p>";
         case CreateAccountStatus.InvalidQuestion:
             return "<p>The password retrieval question provided is invalid. Please check the value and try again.</p>";
         case CreateAccountStatus.ProviderError:
             return "<p>The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator.</p>";
         case CreateAccountStatus.UserRejected:
             return "<p>The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.</p>";
         default:
             return "<p>An unknown error has occurred. Please verify your entry and try again.</p><p>If the problem persists, please contact your system administrator.</p>";
     }
 }
Ejemplo n.º 3
0
        public void OrganizationsCreateAccount()
        {
            #region to-create-a-new-account-that-is-automatically-part-of-the-organization-1472501463507

            var response = client.CreateAccount(new CreateAccountRequest
            {
                AccountName = "Production Account",
                Email       = "*****@*****.**"
            });

            CreateAccountStatus createAccountStatus = response.CreateAccountStatus;

            #endregion
        }
 protected override void ReadPacketInternal(PacketBuffer buffer, PacketRole role)
 {
     StatusCode = (CreateAccountStatus)buffer.ReadByte();
 }
 public AccountCreationException(string Message, CreateAccountStatus status)
     : base(Message)
 {
     _status = status;
 }