public override IList <IPeriod> Evaluate(IDateTime referenceDate, DateTime periodStart, DateTime periodEnd, bool includeReferenceDateInResults)
        {
            // Create a recurrence pattern suitable for use during evaluation.
            IRecurrencePattern pattern = ProcessRecurrencePattern(referenceDate);

            // Enforce evaluation restrictions on the pattern.
            EnforceEvaluationRestrictions(pattern);

            SortedList <IPeriod, IPeriod> periods = new SortedList <IPeriod, IPeriod>();

            foreach (DateTime dt in GetDates(referenceDate, periodStart, periodEnd, -1, pattern, includeReferenceDateInResults))
            {
                // Create a period from the date/time.
                IPeriod p = CreatePeriod(dt, referenceDate);

                if (!periods.ContainsKey(p))
                {
                    periods.Add(p, p);
                }
            }


            Periods.Clear();

            Periods.AddRange(periods.Values);

            return(Periods);
        }