예제 #1
0
파일: TripTime.cs 프로젝트: sdrewc/DaySim
        public bool Equals(TripTime other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(other.Index == Index);
        }
예제 #2
0
파일: TripTime.cs 프로젝트: sdrewc/DaySim
        public static void InitializeTripTimes()
        {
            if (Times != null)
            {
                return;
            }

            Times = new TripTime[TOTAL_TRIP_TIMES];

            var alternativeIndex = 0;

            foreach (var minuteSpan in DayPeriod.SmallDayPeriods)
            {
                var time = new TripTime(alternativeIndex, minuteSpan);

                Times[alternativeIndex++] = time;
            }
        }