示例#1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Marketplace == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Marketplace");
     }
     if (Participation == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Participation");
     }
     if (Marketplace != null)
     {
         Marketplace.Validate();
     }
     if (Participation != null)
     {
         Participation.Validate();
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the MarketplaceParticipation class.
 /// </summary>
 public MarketplaceParticipation(Marketplace marketplace, Participation participation)
 {
     Marketplace   = marketplace;
     Participation = participation;
     CustomInit();
 }