Пример #1
0
        /// <summary>
        /// Loops through all time periods of the timeline in reverse chronological order.
        /// </summary>
        /// <param name="timelineVisitor">Visitor</param>
        public void VisitTimePeriodsInReverseOrder(ITimelineVisitor timelineVisitor)
        {
            if (timelineVisitor == null)
            {
                throw new ArgumentNullException("timelineVisitor");
            }
            if (this.timePeriods.Count == 0)
            {
                return;
            }

            for (int i = this.timePeriods.Count - 1; i >= 0; i--)
            {
                timelineVisitor.Visit(this.timePeriods[i]);
            }
        }
Пример #2
0
        /// <summary>
        /// Loops through all time periods of the timeline in chronological order.
        /// </summary>
        /// <param name="timelineVisitor">Visitor</param>
        public void VisitTimePeriods(ITimelineVisitor timelineVisitor)
        {
            if (timelineVisitor == null)
            {
                throw new ArgumentNullException("timelineVisitor");
            }
            if (this.timePeriods.Count == 0)
            {
                return;
            }

            foreach (TimePeriod period in this.timePeriods)
            {
                timelineVisitor.Visit(period);
            }
        }