/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ContactAdmin != null)
     {
         ContactAdmin.Validate();
     }
     if (ContactBilling != null)
     {
         ContactBilling.Validate();
     }
     if (ContactRegistrant != null)
     {
         ContactRegistrant.Validate();
     }
     if (ContactTech != null)
     {
         ContactTech.Validate();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (ContactAdmin == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ContactAdmin");
     }
     if (ContactBilling == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ContactBilling");
     }
     if (ContactRegistrant == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ContactRegistrant");
     }
     if (ContactTech == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ContactTech");
     }
     if (Consent == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Consent");
     }
     if (ContactAdmin != null)
     {
         ContactAdmin.Validate();
     }
     if (ContactBilling != null)
     {
         ContactBilling.Validate();
     }
     if (ContactRegistrant != null)
     {
         ContactRegistrant.Validate();
     }
     if (ContactTech != null)
     {
         ContactTech.Validate();
     }
 }