예제 #1
0
        // Token: 0x06000957 RID: 2391 RVA: 0x0003EB14 File Offset: 0x0003CD14
        public void UpdateOldFields(MeetingRequest mtgReq)
        {
            ExDateTime?oldStartTime = null;
            ExDateTime?oldEndTime   = null;

            CalendarInfo.GetOldFields(mtgReq, out oldStartTime, out oldEndTime);
            this.UpdateOldFields(oldStartTime, oldEndTime);
        }
예제 #2
0
        // Token: 0x0600095F RID: 2399 RVA: 0x0003F0D0 File Offset: 0x0003D2D0
        public static List <CalendarInfo> Load(ExDateTime creationRequestTime, ExTimeZone timeZoneAdjustment, MailboxSession session, MeetingRequest mtgReq, CalendarItemBase calItemBase, StorageWorkingHours workingHours, ExDateTime actualizationTime, ExDateTime endTime)
        {
            List <CalendarInfo>   list        = new List <CalendarInfo>();
            Interval <ExDateTime> timeslot    = new Interval <ExDateTime>(actualizationTime, false, endTime, true);
            ExDateTime?           exDateTime  = null;
            ExDateTime?           exDateTime2 = null;

            if (mtgReq != null)
            {
                CalendarInfo.GetOldFields(mtgReq, out exDateTime, out exDateTime2);
            }
            if (CalendarItemType.RecurringMaster != calItemBase.CalendarItemType || ((CalendarItem)calItemBase).Recurrence == null)
            {
                CalendarInfo calendarInfo = CalendarInfo.FromCalendarItemBase(creationRequestTime, timeZoneAdjustment, calItemBase);
                calendarInfo.UpdateOldFields(exDateTime, exDateTime2);
                if (OccurrenceLoader.IsInteresing(timeslot, calendarInfo.OldStartTime, calendarInfo.OldEndTime, calendarInfo.StartTime, calendarInfo.EndTime, workingHours))
                {
                    list.Add(calendarInfo);
                }
                else
                {
                    ExTraceGlobals.AssistantTracer.TraceDebug((long)typeof(ReminderLoader).GetHashCode(), "The calendar update/reminder is out of the valid scope. subj: {0}, calItemId: {1}, calItemOccId: {2}, event_t: {3}, rmd_t: {4}, s_t: {5}, e_t: {6}, S_T: {7} E_T: {8}, scope_s: {9}, scope_e: {10}", new object[]
                    {
                        calendarInfo.NormalizedSubject,
                        calendarInfo.CalendarItemIdentity,
                        calendarInfo.CalendarItemOccurrenceIdentity,
                        calendarInfo.CreationRequestTime,
                        calendarInfo.ReminderTime,
                        calendarInfo.OldStartTime,
                        calendarInfo.OldEndTime,
                        calendarInfo.StartTime,
                        calendarInfo.EndTime,
                        actualizationTime,
                        endTime
                    });
                }
                return(list);
            }
            foreach (OccurrenceInfo occurrenceInfo in ((CalendarItem)calItemBase).Recurrence.GetOccurrenceInfoList(actualizationTime, endTime))
            {
                if (!OccurrenceLoader.IsInteresing(timeslot, exDateTime, exDateTime2, occurrenceInfo.StartTime, occurrenceInfo.EndTime, workingHours))
                {
                    ExTraceGlobals.AssistantTracer.TraceDebug((long)typeof(ReminderLoader).GetHashCode(), "The calendar update/reminder is out of the valid scope.calItemId: {0}, calItemOccId: {1}, event_t: {2}, rmd_m: {3}, s_t: {4}, e_t: {5}, S_T: {6} E_T: {7}, scope_s: {8}, scope_e: {9}", new object[]
                    {
                        (calItemBase.Id == null) ? null : calItemBase.Id.ObjectId,
                        occurrenceInfo.OccurrenceDateId,
                        actualizationTime,
                        (calItemBase.Reminder == null) ? -1 : calItemBase.Reminder.MinutesBeforeStart,
                        exDateTime,
                        exDateTime2,
                        occurrenceInfo.StartTime,
                        occurrenceInfo.EndTime,
                        actualizationTime,
                        endTime
                    });
                }
                else
                {
                    CalendarInfo calendarInfo2 = null;
                    if (occurrenceInfo.VersionedId == null)
                    {
                        calendarInfo2 = CalendarInfo.FromMasterCalendarItemAndOccurrenceInfo(creationRequestTime, timeZoneAdjustment, (CalendarItem)calItemBase, occurrenceInfo);
                    }
                    else
                    {
                        using (CalendarItemOccurrence calendarItemOccurrence = ((CalendarItem)calItemBase).OpenOccurrenceByOriginalStartTime(occurrenceInfo.OriginalStartTime, new PropertyDefinition[0]))
                        {
                            calendarInfo2 = CalendarInfo.FromCalendarItemBase(creationRequestTime, timeZoneAdjustment, calendarItemOccurrence);
                        }
                    }
                    calendarInfo2.UpdateOldFields(exDateTime, exDateTime2);
                    list.Add(calendarInfo2);
                }
            }
            return(list);
        }