コード例 #1
0
        public void Validate()
        {
            if (DaysOfTheWeek == null || DaysOfTheWeek.Count == 0 ||
                DaysOfTheWeek.Count != DaysOfTheWeek.Distinct().Count())
            {
                throw new ArgumentException(Resources.InvalidDaysOfWeekInMonthlyYearlyRetentionPolicyException);
            }

            if (WeeksOfTheMonth == null || WeeksOfTheMonth.Count == 0 ||
                WeeksOfTheMonth.Count != WeeksOfTheMonth.Distinct().Count())
            {
                throw new ArgumentException(Resources.InvalidWeeksOfMonthInMonthlyYearlyRetentionPolicyException);
            }
        }