public virtual ValidationResult Validate() { if (!RunEvents.Any((re) => re.TimeTracked == 0 && re.Behavior.Type == Behavior.BehaviorType.State)) { return(new ValidationResult() { IsValid = false, Error = "This run contains no state behavior starting at the beginning of the run." }); } return(new ValidationResult() { IsValid = true }); }
public virtual void AddRunEvent(RunEvent runEvent) { runEvent.Run = this; RunEvents.Add(runEvent); }