private static WeeklyRetentionFormat GetPSLTRWeeklyRetentionFormat(
            ServiceClientModel.WeeklyRetentionFormat serviceClientFormat)
        {
            if (serviceClientFormat == null)
            {
                return(null);
            }

            WeeklyRetentionFormat psFormat = new WeeklyRetentionFormat();

            if (serviceClientFormat.DaysOfTheWeek != null)
            {
                psFormat.DaysOfTheWeek =
                    HelperUtils.EnumListConverter <ServiceClientModel.DayOfWeek?, DayOfWeek>(
                        serviceClientFormat.DaysOfTheWeek);
            }
            if (serviceClientFormat.WeeksOfTheMonth != null)
            {
                psFormat.WeeksOfTheMonth =
                    HelperUtils.EnumListConverter <ServiceClientModel.WeekOfMonth?, WeekOfMonth>(
                        serviceClientFormat.WeeksOfTheMonth);
            }

            return(psFormat);
        }
Пример #2
0
        private static ServiceClientModel.WeeklyRetentionFormat GetServiceClientLTRWeeklyRetentionFormat(
            WeeklyRetentionFormat psFormat)
        {
            if (psFormat == null)
            {
                return(null);
            }

            ServiceClientModel.WeeklyRetentionFormat serviceClientFormat = new ServiceClientModel.WeeklyRetentionFormat();
            if (psFormat.DaysOfTheWeek != null)
            {
                serviceClientFormat.DaysOfTheWeek = HelperUtils.GetStringListFromEnumList <DayOfWeek>(psFormat.DaysOfTheWeek);
            }
            if (psFormat.WeeksOfTheMonth != null)
            {
                serviceClientFormat.WeeksOfTheMonth = HelperUtils.GetStringListFromEnumList <WeekOfMonth>(psFormat.WeeksOfTheMonth);
            }

            return(serviceClientFormat);
        }
        private static ServiceClientModel.WeeklyRetentionFormat GetServiceClientLTRWeeklyRetentionFormat(
            WeeklyRetentionFormat psFormat)
        {
            if (psFormat == null)
            {
                return(null);
            }

            ServiceClientModel.WeeklyRetentionFormat serviceClientFormat = new ServiceClientModel.WeeklyRetentionFormat();
            if (psFormat.DaysOfTheWeek != null)
            {
                serviceClientFormat.DaysOfTheWeek =
                    HelperUtils.EnumListConverter <DayOfWeek, ServiceClientModel.DayOfWeek>(
                        psFormat.DaysOfTheWeek).Cast <ServiceClientModel.DayOfWeek?>().ToList();
            }
            if (psFormat.WeeksOfTheMonth != null)
            {
                serviceClientFormat.WeeksOfTheMonth =
                    HelperUtils.EnumListConverter <WeekOfMonth, ServiceClientModel.WeekOfMonth>(
                        psFormat.WeeksOfTheMonth).Cast <ServiceClientModel.WeekOfMonth?>().ToList();
            }

            return(serviceClientFormat);
        }
        private static ServiceClientModel.WeeklyRetentionFormat GetServiceClientLTRWeeklyRetentionFormat(
                                              WeeklyRetentionFormat psFormat)
        {
            if (psFormat == null)
            {
                return null;
            }

            ServiceClientModel.WeeklyRetentionFormat serviceClientFormat = new ServiceClientModel.WeeklyRetentionFormat();
            if (psFormat.DaysOfTheWeek != null)
            {
                serviceClientFormat.DaysOfTheWeek = HelperUtils.GetStringListFromEnumList<DayOfWeek>(psFormat.DaysOfTheWeek);
            }
            if (psFormat.WeeksOfTheMonth != null)
            {
                serviceClientFormat.WeeksOfTheMonth = HelperUtils.GetStringListFromEnumList<WeekOfMonth>(psFormat.WeeksOfTheMonth);
            }

            return serviceClientFormat;
        }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the YearlyRetentionSchedule class.
 /// </summary>
 /// <param name="retentionScheduleFormatType">Retention schedule format
 /// for yearly retention policy. Possible values include: 'Invalid',
 /// 'Daily', 'Weekly'</param>
 /// <param name="monthsOfYear">List of months of year of yearly
 /// retention policy.</param>
 /// <param name="retentionScheduleDaily">Daily retention format for
 /// yearly retention policy.</param>
 /// <param name="retentionScheduleWeekly">Weekly retention format for
 /// yearly retention policy.</param>
 /// <param name="retentionTimes">Retention times of retention
 /// policy.</param>
 /// <param name="retentionDuration">Retention duration of retention
 /// Policy.</param>
 public YearlyRetentionSchedule(string retentionScheduleFormatType = default(string), IList <MonthOfYear?> monthsOfYear = default(IList <MonthOfYear?>), DailyRetentionFormat retentionScheduleDaily = default(DailyRetentionFormat), WeeklyRetentionFormat retentionScheduleWeekly = default(WeeklyRetentionFormat), IList <System.DateTime?> retentionTimes = default(IList <System.DateTime?>), RetentionDuration retentionDuration = default(RetentionDuration))
 {
     RetentionScheduleFormatType = retentionScheduleFormatType;
     MonthsOfYear            = monthsOfYear;
     RetentionScheduleDaily  = retentionScheduleDaily;
     RetentionScheduleWeekly = retentionScheduleWeekly;
     RetentionTimes          = retentionTimes;
     RetentionDuration       = retentionDuration;
     CustomInit();
 }