// Token: 0x06002FD2 RID: 12242 RVA: 0x00116930 File Offset: 0x00114B30 private static void GetConflictingAppointments(Infobar infobar, CalendarItemBase calendarItemBase, UserContext userContext) { if (Utilities.IsPublic(calendarItemBase)) { return; } using (CalendarFolder calendarFolder = CalendarFolder.Bind(calendarItemBase.Session as MailboxSession, DefaultFolderType.Calendar)) { AdjacencyOrConflictInfo[] adjacentOrConflictingItems = calendarFolder.GetAdjacentOrConflictingItems(calendarItemBase); if (adjacentOrConflictingItems != null && adjacentOrConflictingItems.Length != 0) { if (Utilities.IsOtherMailbox(calendarItemBase)) { CalendarUtilities.AddConflictingAppointmentsInfobarMessage(infobar, adjacentOrConflictingItems, userContext, calendarItemBase.CalendarItemType, Utilities.GetMailboxOwnerDisplayName((MailboxSession)calendarItemBase.Session), OwaStoreObjectId.CreateFromStoreObject(calendarFolder)); } else { CalendarUtilities.AddConflictingAppointmentsInfobarMessage(infobar, adjacentOrConflictingItems, userContext, calendarItemBase.CalendarItemType); } } } }
// Token: 0x06000B8D RID: 2957 RVA: 0x0004C6E4 File Offset: 0x0004A8E4 public static bool CheckCalendarConflict(MailboxSession itemStore, CalendarItemBase request, ExDateTime?endOfBookingWindow, out List <AdjacencyOrConflictInfo> conflictList) { conflictList = new List <AdjacencyOrConflictInfo>(); if (endOfBookingWindow != null && endOfBookingWindow < request.StartTime) { endOfBookingWindow = null; } using (CalendarFolder calendarFolder = CalendarFolder.Bind(itemStore, DefaultFolderType.Calendar)) { AdjacencyOrConflictInfo[] adjacentOrConflictingItems = calendarFolder.GetAdjacentOrConflictingItems(request, endOfBookingWindow); if (adjacentOrConflictingItems != null) { ExDateTime now = ExDateTime.Now; foreach (AdjacencyOrConflictInfo adjacencyOrConflictInfo in adjacentOrConflictingItems) { if ((adjacencyOrConflictInfo.AdjacencyOrConflictType & AdjacencyOrConflictType.Conflicts) == AdjacencyOrConflictType.Conflicts && adjacencyOrConflictInfo.FreeBusyStatus != BusyType.Free && !(adjacencyOrConflictInfo.OccurrenceInfo.EndTime <= now)) { conflictList.Add(adjacencyOrConflictInfo); } } } } return(conflictList.Count != 0); }