public static bool?IsOrganizer(MailboxSession mailboxSession, GlobalObjectId globalObjectId, out string subject, out string organizerEmailAddress) { ExTraceGlobals.SyncTracer.TraceDebug <GlobalObjectId, bool>(0L, "[MeetingOrganizerValidatior.IsOrganizer] Search IsOrganizer GOID: {0}, IsCleanGoID: {1}", globalObjectId, globalObjectId.IsCleanGlobalObjectId); subject = null; organizerEmailAddress = null; if (!globalObjectId.IsCleanGlobalObjectId) { globalObjectId = new GlobalObjectId(globalObjectId.CleanGlobalObjectIdBytes); } bool value = false; bool flag = MeetingOrganizerValidator.SearchForCalendarItem(mailboxSession, mailboxSession.GetDefaultFolderId(DefaultFolderType.Calendar), globalObjectId, out value, out subject, out organizerEmailAddress); if (!flag) { ExTraceGlobals.SyncTracer.TraceDebug(0L, "[MeetingOrganizerValidatior.IsOrganizer] Correlated CalendarItem not found in default calendar folder. Searching in calendar sub folders..."); using (Folder folder = Folder.Bind(mailboxSession, DefaultFolderType.Calendar)) { using (QueryResult queryResult = folder.FolderQuery(FolderQueryFlags.DeepTraversal, null, null, MeetingOrganizerValidator.FetchProperties)) { bool flag2 = true; while (flag2) { object[][] rows = queryResult.GetRows(10000); if (rows == null || rows.Length == 0) { break; } for (int i = 0; i < rows.Length; i++) { VersionedId versionedId = rows[i][0] as VersionedId; StoreObjectId storeObjectId = (versionedId != null) ? versionedId.ObjectId : null; int? num = rows[i][1] as int?; int extendedFolderFlags = (num != null) ? num.Value : 0; if (storeObjectId == null || CalendarFolder.IsCrossOrgShareFolder(extendedFolderFlags) || CalendarFolder.IsInternetCalendar(extendedFolderFlags)) { ExTraceGlobals.SyncTracer.TraceDebug <StoreObjectId>(0L, "[MeetingOrganizerValidator.IsOrganizer] Skipping Calendar '{0}' as it is either a sharing folder or iCal folder", storeObjectId); } else { flag = MeetingOrganizerValidator.SearchForCalendarItem(mailboxSession, storeObjectId, globalObjectId, out value, out subject, out organizerEmailAddress); if (flag) { flag2 = false; break; } } } } } goto IL_16D; } } ExTraceGlobals.SyncTracer.TraceDebug(0L, "[MeetingOrganizerValidatior.IsOrganizer] Correlated CalendarItem found in default calendar folder"); IL_16D: if (!flag) { return(null); } return(new bool?(value)); }
// Token: 0x06000831 RID: 2097 RVA: 0x00039E7F File Offset: 0x0003807F protected override bool MatchesExtendedFolderFlags(int extendedFolderFlags) { return(CalendarFolder.IsCrossOrgShareFolder(extendedFolderFlags)); }