public static bool CheckShouldDisableOccurrenceReminderUI(CalendarItemBase calendarItemBase) { if (calendarItemBase == null) { throw new ArgumentNullException("calendarItemBase"); } bool result = false; if (calendarItemBase.CalendarItemType != CalendarItemType.Single && calendarItemBase.CalendarItemType != CalendarItemType.RecurringMaster) { CalendarItemOccurrence calendarItemOccurrence = calendarItemBase as CalendarItemOccurrence; if (calendarItemOccurrence != null) { using (CalendarItem master = calendarItemOccurrence.GetMaster()) { object obj = master.TryGetProperty(ItemSchema.ReminderIsSet); result = (obj is bool && !(bool)obj); } } } return(result); }
private bool ShouldPreserveLocalExceptions(CalendarItem calendarItem) { InternalRecurrence recurrenceFromItem = CalendarItem.GetRecurrenceFromItem(this); Recurrence recurrence = null; try { recurrence = calendarItem.Recurrence; } catch (RecurrenceFormatException ex) { ExTraceGlobals.MeetingMessageTracer.Information <string, GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingRequest.ShouldPreserveLocalExceptions encountered a recurrence format exception ({0}). Local exceptions will not be preserved: GOID={1}", ex.Message, this.GlobalObjectId); } catch (CorruptDataException ex2) { ExTraceGlobals.MeetingMessageTracer.Information <string, GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingRequest.ShouldPreserveLocalExceptions encountered a corrupt data exception ({0}). Local exceptions will not be preserved: GOID={1}", ex2.Message, this.GlobalObjectId); } return(recurrence != null && recurrenceFromItem != null && recurrence.Equals(recurrenceFromItem) && MeetingRequest.ArePropsEqual(calendarItem.TryGetProperty(InternalSchema.StartTime), base.TryGetProperty(InternalSchema.StartTime)) && MeetingRequest.ArePropsEqual(calendarItem.TryGetProperty(InternalSchema.EndTime), base.TryGetProperty(InternalSchema.EndTime))); }