예제 #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (SportEvent == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SportEvent");
     }
     if (SportEventStatus == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SportEventStatus");
     }
     if (SportEvent != null)
     {
         SportEvent.Validate();
     }
     if (SportEventStatus != null)
     {
         SportEventStatus.Validate();
     }
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the DailyResult class.
 /// </summary>
 public DailyResult(SportEvent sportEvent, SportEventStatus sportEventStatus)
 {
     SportEvent       = sportEvent;
     SportEventStatus = sportEventStatus;
     CustomInit();
 }