예제 #1
0
        public IEnumerable <DateTime> GetMatches(DateTime?lastMachingTime)
        {
            if (lastMachingTime.HasValue && lastMachingTime.Value.Kind != DateTimeKind.Utc)
            {
                throw new ArgumentException("Only DateTime values in UTC should be passed.", "lastMachingTime");
            }

            var baseTime = lastMachingTime ?? UtcTime.AddSeconds(-1);
            var endTime  = UtcTime.AddSeconds(1);

            return(_schedule.GetNextOccurrences(baseTime, endTime));
        }