예제 #1
0
        public static RecurrenceRule Parse(EventRepeatType repeatType)
        {
            return(repeatType switch
            {
                EventRepeatType.EveryDay => new RecurrenceRule()
                {
                    Freq = Frequency.Daily
                },

                EventRepeatType.EveryMonth => new RecurrenceRule()
                {
                    Freq = Frequency.Monthly
                },

                EventRepeatType.EveryWeek => new RecurrenceRule()
                {
                    Freq = Frequency.Weekly
                },

                EventRepeatType.EveryYear => new RecurrenceRule()
                {
                    Freq = Frequency.Yearly
                },

                EventRepeatType.Never => new RecurrenceRule()
                {
                    Freq = Frequency.Never
                },

                _ => new RecurrenceRule()
                {
                    Freq = Frequency.Never
                },
            });
예제 #2
0
 public EventModel(
     uint id,
     List <EventConditionModel> eventConditionModels,
     EventContentsModel eventContentsModel,
     EventRepeatType eventRepeatType,
     RewardModel rewardModel
     )
 {
     this.Id = id;
     this.EventConditionModels = eventConditionModels;
     this.EventContentsModel   = eventContentsModel;
     this.EventRepeatType      = eventRepeatType;
     this.RewardModel          = rewardModel;
 }
예제 #3
0
        public static RecurrenceRule Parse(EventRepeatType repeatType)
        {
            switch (repeatType)
            {
            case EventRepeatType.EveryDay:
                return(new RecurrenceRule()
                {
                    Freq = Frequency.Daily
                });

            case EventRepeatType.EveryMonth:
                return(new RecurrenceRule()
                {
                    Freq = Frequency.Monthly
                });

            case EventRepeatType.EveryWeek:
                return(new RecurrenceRule()
                {
                    Freq = Frequency.Weekly
                });

            case EventRepeatType.EveryYear:
                return(new RecurrenceRule()
                {
                    Freq = Frequency.Yearly
                });

            case EventRepeatType.Never:
                return(new RecurrenceRule()
                {
                    Freq = Frequency.Never
                });
            }

            return(new RecurrenceRule()
            {
                Freq = Frequency.Never
            });
        }
예제 #4
0
        public static RecurrenceRule Parse(EventRepeatType repeatType)
        {
            switch (repeatType)
            { 
                case EventRepeatType.EveryDay:
                    return new RecurrenceRule() { Freq = Frequency.Daily };

                case EventRepeatType.EveryMonth :
                    return new RecurrenceRule() { Freq = Frequency.Monthly };

                case EventRepeatType.EveryWeek:
                    return new RecurrenceRule() { Freq = Frequency.Weekly };

                case EventRepeatType.EveryYear:
                    return new RecurrenceRule() { Freq = Frequency.Yearly };

                case EventRepeatType.Never:
                    return new RecurrenceRule() { Freq = Frequency.Never };
            }

            return new RecurrenceRule() { Freq = Frequency.Never };

        }