/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (PasswordProfile != null)
     {
         PasswordProfile.Validate();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (DisplayName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName");
     }
     if (PasswordProfile == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PasswordProfile");
     }
     if (UserPrincipalName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UserPrincipalName");
     }
     if (MailNickname == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MailNickname");
     }
     if (PasswordProfile != null)
     {
         PasswordProfile.Validate();
     }
 }