コード例 #1
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.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);
        }
コード例 #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;
        }