public CalendarEventData(CalendarDayEvent dayEvent, uint eventIndex)
        {
            this.EventID         = dayEvent.eventID;
            this.CalendarType    = dayEvent.calendarType;
            this.StartTime       = dayEvent.startTime.ToDateTime();
            this.EndTime         = dayEvent.endTime.ToDateTime();
            this.Title           = dayEvent.title;
            this.EventIndex      = eventIndex;
            this.InviteStatus    = dayEvent.inviteStatus;
            this.InvitedBy       = dayEvent.invitedBy;
            this.ModStatus       = dayEvent.modStatus;
            this.NumSequenceDays = dayEvent.numSequenceDays;
            this.SequenceIndex   = dayEvent.sequenceIndex;
            this.SequenceType    = dayEvent.sequenceType;
            this.EventTime       = this.StartTime.AddDays(this.SequenceIndex);
            uint?num = (dayEvent.clubID == 0UL) ? null : new uint?((uint)dayEvent.clubID);

            this.ClubID           = ((num == null) ? null : new ulong?((ulong)num.Value));
            this.IsCommunityEvent = (this.ClubID != null);
        }
        private bool IsEventOnDay(CalendarDayEvent dayEvent, DateTime dateTime)
        {
            DateTime dateTime2 = dayEvent.startTime.ToDateTime();

            return(dateTime2.Year == dateTime.Year && (long)dateTime2.DayOfYear + (long)((ulong)dayEvent.sequenceIndex) == (long)dateTime.DayOfYear);
        }