// Token: 0x06000952 RID: 2386 RVA: 0x0003E760 File Offset: 0x0003C960 public static CalendarInfo FromInterestedProperties(ExDateTime creationRequestTime, ExTimeZone timeZoneAdjustment, MailboxSession session, bool online, object[] propVals) { CalendarInfo calendarInfo = new CalendarInfo(); calendarInfo.CreationRequestTime = creationRequestTime; calendarInfo.CalendarItemType = CalendarInfo.GetProperty <CalendarItemType>(propVals[8], CalendarItemType.Single); VersionedId property = CalendarInfo.GetProperty <VersionedId>(propVals[0], null); if (property != null) { StoreObjectId objectId = property.ObjectId; if (calendarInfo.CalendarItemType != CalendarItemType.Single && CalendarItemType.RecurringMaster != calendarInfo.CalendarItemType) { calendarInfo.CalendarItemOccurrenceIdentity = objectId; if (!online) { goto IL_79; } using (CalendarItemOccurrence calendarItemOccurrence = CalendarItemOccurrence.Bind(session, objectId)) { calendarInfo.CalendarItemIdentity = calendarItemOccurrence.MasterId.ObjectId; goto IL_79; } } calendarInfo.CalendarItemIdentity = objectId; } IL_79: calendarInfo.Location = CalendarInfo.GetProperty <string>(propVals[4], string.Empty); calendarInfo.ReminderIsSet = CalendarInfo.GetProperty <bool>(propVals[3], false); calendarInfo.StartTime = CalendarInfo.GetProperty <ExDateTime>(propVals[5], ExDateTime.MinValue); calendarInfo.EndTime = CalendarInfo.GetProperty <ExDateTime>(propVals[6], ExDateTime.MinValue); calendarInfo.FreeBusyStatus = (BusyType)CalendarInfo.GetProperty <int>(propVals[7], -1); calendarInfo.ChangeHighlight = (ChangeHighlightProperties)CalendarInfo.GetProperty <int>(propVals[1], 0); calendarInfo.AppointmentState = (AppointmentStateFlags)CalendarInfo.GetProperty <int>(propVals[2], 0); calendarInfo.NormalizedSubject = CalendarInfo.GetProperty <string>(propVals[9], string.Empty); calendarInfo.ResponseType = CalendarInfo.GetProperty <ResponseType>(propVals[10], ResponseType.None); calendarInfo.ReminderMinutesBeforeStart = (calendarInfo.ReminderIsSet ? CalendarInfo.GetProperty <int>(propVals[11], 0) : 0); calendarInfo.IsVoiceReminderEnabled = CalendarInfo.GetProperty <bool>(propVals[14], false); calendarInfo.VoiceReminderPhoneNumber = CalendarInfo.GetProperty <string>(propVals[15], string.Empty); calendarInfo.ReminderTime = ((ExDateTime.MinValue < calendarInfo.StartTime) ? (calendarInfo.StartTime - TimeSpan.FromMinutes((double)calendarInfo.ReminderMinutesBeforeStart)) : ExDateTime.MinValue); calendarInfo.AdjustTimeZone(timeZoneAdjustment); return(calendarInfo); }
// Token: 0x06000954 RID: 2388 RVA: 0x0003E968 File Offset: 0x0003CB68 public static CalendarInfo FromCalendarItemBase(ExDateTime creationRequestTime, ExTimeZone timeZoneAdjustment, CalendarItemBase cal) { CalendarInfo calendarInfo = new CalendarInfo(); calendarInfo.CreationRequestTime = creationRequestTime; calendarInfo.CalendarItemType = cal.CalendarItemType; CalendarItemOccurrence calendarItemOccurrence = cal as CalendarItemOccurrence; if (cal.Id != null) { if (calendarInfo.CalendarItemType == CalendarItemType.Single || CalendarItemType.RecurringMaster == calendarInfo.CalendarItemType) { calendarInfo.CalendarItemIdentity = cal.Id.ObjectId; } else { calendarInfo.CalendarItemOccurrenceIdentity = cal.Id.ObjectId; if (calendarItemOccurrence.MasterId != null) { calendarInfo.CalendarItemIdentity = calendarItemOccurrence.MasterId.ObjectId; } } } calendarInfo.Location = cal.Location; calendarInfo.ReminderIsSet = cal.Reminder.IsSet; calendarInfo.StartTime = cal.StartTime; calendarInfo.EndTime = cal.EndTime; calendarInfo.FreeBusyStatus = cal.FreeBusyStatus; calendarInfo.ResponseType = cal.ResponseType; calendarInfo.ReminderMinutesBeforeStart = (calendarInfo.ReminderIsSet ? cal.Reminder.MinutesBeforeStart : 0); calendarInfo.IsVoiceReminderEnabled = cal.IsVoiceReminderEnabled; calendarInfo.VoiceReminderPhoneNumber = cal.VoiceReminderPhoneNumber; calendarInfo.ReminderTime = ((ExDateTime.MinValue < calendarInfo.StartTime) ? (calendarInfo.StartTime - TimeSpan.FromMinutes((double)calendarInfo.ReminderMinutesBeforeStart)) : ExDateTime.MinValue); calendarInfo.ChangeHighlight = cal.GetValueOrDefault <ChangeHighlightProperties>(CalendarItemBaseSchema.ChangeHighlight); calendarInfo.AppointmentState = cal.GetValueOrDefault <AppointmentStateFlags>(CalendarItemBaseSchema.AppointmentState); calendarInfo.NormalizedSubject = cal.GetValueOrDefault <string>(ItemSchema.NormalizedSubject); calendarInfo.AdjustTimeZone(timeZoneAdjustment); return(calendarInfo); }