internal LotteryDTO(lottery_schedule item)
            : this(item.lottery)
        {
            Contract.Requires(item != null);

            if (item.draw_events != null && item.draw_events.Any())
            {
                DrawEvents = item.draw_events.Select(draw => new DrawDTO(draw)).ToList();
            }
        }
        internal LotteryDTO(lottery_schedule item)
            : this(item.lottery)
        {
            Guard.Argument(item, nameof(item)).NotNull();

            if (item.draw_events != null && item.draw_events.Any())
            {
                DrawEvents = item.draw_events.Select(draw => new DrawDTO(draw)).ToList();
            }

            GeneratedAt = item.generated_atSpecified ? item.generated_at : (DateTime?)null;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LotteryScheduleMapper"/> class
        /// </summary>
        /// <param name="lotterySchedule">A <see cref="lottery"/> containing lottery schedule data (single lottery with schedule)</param>
        internal LotteryScheduleMapper(lottery_schedule lotterySchedule)
        {
            Guard.Argument(lotterySchedule, nameof(lotterySchedule)).NotNull();

            _lotterySchedule = lotterySchedule;
        }
Example #4
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="LotteryScheduleMapper" /> class
        /// </summary>
        /// <param name="lotterySchedule">A <see cref="lottery" /> containing lottery schedule data (single lottery with schedule)</param>
        internal LotteryScheduleMapper(lottery_schedule lotterySchedule)
        {
            Contract.Requires(lotterySchedule != null);

            _lotterySchedule = lotterySchedule;
        }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LotteryScheduleMapper"/> class
 /// </summary>
 /// <param name="lotterySchedule">A <see cref="lottery"/> containing lottery schedule data (single lottery with schedule)</param>
 internal LotteryScheduleMapper(lottery_schedule lotterySchedule)
 {
     _lotterySchedule = lotterySchedule;
 }