Ejemplo n.º 1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (EncryptedPassword != null)
     {
         EncryptedPassword.Validate();
     }
     if (ShareAccessRights != null)
     {
         foreach (var element in ShareAccessRights)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (UserType == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UserType");
     }
     if (EncryptedPassword != null)
     {
         EncryptedPassword.Validate();
     }
     if (ShareAccessRights != null)
     {
         foreach (var element in ShareAccessRights)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }