protected internal override CalendarItemOccurrence RecoverDeletedOccurrence() { if (this.possibleDeletedOccurrenceId != null) { MailboxSession calendarMailboxSession = MeetingMessage.GetCalendarMailboxSession(this); for (int i = 0; i < 2; i++) { CalendarItem calendarItem = CalendarItem.Bind(calendarMailboxSession, StoreObjectId.FromProviderSpecificId(this.possibleDeletedOccurrenceId.ProviderLevelItemId, StoreObjectType.CalendarItem)); try { calendarItem.OpenAsReadWrite(); if (calendarItem.Recurrence != null) { InternalRecurrence internalRecurrence = (InternalRecurrence)calendarItem.Recurrence; ExDateTime occurrenceId = ((OccurrenceStoreObjectId)this.possibleDeletedOccurrenceId).OccurrenceId; if (internalRecurrence.IsValidOccurrenceId(occurrenceId)) { if (internalRecurrence.IsOccurrenceDeleted(occurrenceId)) { base.LocationIdentifierHelperInstance.SetLocationIdentifier(39541U, LastChangeAction.RecoverDeletedOccurance); calendarItem.RecoverDeletedOccurrence(this.possibleDeletedOccurrenceId); if (calendarItem.Save(SaveMode.ResolveConflicts).SaveStatus == SaveResult.IrresolvableConflict) { goto IL_136; } } CalendarItemOccurrence calendarItemOccurrence = CalendarItemOccurrence.Bind(calendarMailboxSession, this.possibleDeletedOccurrenceId, MeetingMessageSchema.Instance.AutoloadProperties); calendarItemOccurrence.OpenAsReadWrite(); ExTraceGlobals.MeetingMessageTracer.Information <GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingMessage.RecoverDeletedOccurrence: GOID={0}; occurrence recovered.", this.GlobalObjectId); return(calendarItemOccurrence); } ExTraceGlobals.MeetingMessageTracer.Information <GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingMessage.RecoverDeletedOccurrence: GOID={0}; occurrence id is invalid.", this.GlobalObjectId); return(null); } } catch (OccurrenceNotFoundException) { ExTraceGlobals.MeetingMessageTracer.Information <GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingMessage.RecoverDeletedOccurrence: GOID={0}; occurrence not found.", this.GlobalObjectId); return(null); } finally { calendarItem.Dispose(); } IL_136 :; } } ExTraceGlobals.MeetingMessageTracer.Information <GlobalObjectId>((long)this.GetHashCode(), "Storage.MeetingMessage.RecoverDeletedOccurrence: GOID={0}; occurrence not recovered.", this.GlobalObjectId); return(null); }