Пример #1
0
        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
            });
        }
Пример #2
0
 public virtual void AddRunEvent(RunEvent runEvent)
 {
     runEvent.Run = this;
     RunEvents.Add(runEvent);
 }