/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (App == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "App");
     }
     if (Email == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Email");
     }
     if (InviteType == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InviteType");
     }
     if (InvitedBy == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InvitedBy");
     }
     if (App != null)
     {
         App.Validate();
     }
     if (InvitedBy != null)
     {
         InvitedBy.Validate();
     }
     if (DistributionGroup != null)
     {
         DistributionGroup.Validate();
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (InvitedBy == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InvitedBy");
     }
     if (InvitedBy != null)
     {
         InvitedBy.Validate();
     }
     if (Organization != null)
     {
         Organization.Validate();
     }
     if (App != null)
     {
         App.Validate();
     }
 }