// Token: 0x06000EF3 RID: 3827 RVA: 0x00059338 File Offset: 0x00057538
 private void HardDeleteItems(PublicFolderItemProcessor.FolderRec folderRec, ExDateTime expiration, PublicFolderAssistantLogger assistantLogger, string operation)
 {
     PublicFolderItemProcessor.CatchAndLogStorageExceptions(assistantLogger, folderRec, operation, delegate
     {
         using (Folder folder = PublicFolderItemProcessor.xsoFactory.BindToFolder(this.publicFolderSession, folderRec.FolderId) as Folder)
         {
             using (QueryResult queryResult = folder.ItemQuery(ItemQueryType.None, null, new SortBy[]
             {
                 new SortBy(CoreObjectSchema.LastModifiedTime, SortOrder.Descending)
             }, PublicFolderItemProcessor.MessageRec.PropertiesToLoad))
             {
                 ComparisonFilter seekFilter = new ComparisonFilter(ComparisonOperator.LessThanOrEqual, CoreObjectSchema.LastModifiedTime, expiration);
                 if (queryResult.SeekToCondition(SeekReference.OriginBeginning, seekFilter))
                 {
                     for (;;)
                     {
                         object[][] rows = queryResult.GetRows(100);
                         if (rows.Length <= 0)
                         {
                             break;
                         }
                         List <StoreObjectId> list = null;
                         foreach (object[] properties in rows)
                         {
                             PublicFolderItemProcessor.MessageRec messageRec = new PublicFolderItemProcessor.MessageRec(properties);
                             ExDateTime?exDateTime = (messageRec.LastModifiedTime != null) ? messageRec.LastModifiedTime : messageRec.ReceivedTime;
                             if (exDateTime == null)
                             {
                                 exDateTime = ((messageRec.CreationTime != null) ? messageRec.CreationTime : new ExDateTime?(ExDateTime.MinValue));
                             }
                             if (exDateTime < expiration)
                             {
                                 if (list == null)
                                 {
                                     list = new List <StoreObjectId>(rows.Length);
                                 }
                                 list.Add(messageRec.ItemId.ObjectId);
                             }
                         }
                         if (list != null)
                         {
                             folder.DeleteObjects(DeleteItemFlags.HardDelete | DeleteItemFlags.SuppressReadReceipt, list.ToArray());
                             assistantLogger.LogEvent(LogEventType.Success, string.Format(CultureInfo.InvariantCulture, "HardDeleteItems. {0}. {1}. {2}", new object[]
                             {
                                 folderRec.FolderId.ToHexEntryId(),
                                 list.Count,
                                 operation
                             }));
                         }
                     }
                 }
             }
         }
     });
 }
 // Token: 0x06000EF4 RID: 3828 RVA: 0x00059524 File Offset: 0x00057724
 private void HardDeleteSubFolders(PublicFolderItemProcessor.FolderRec folderRec, ExDateTime expiration, PublicFolderAssistantLogger assistantLogger)
 {
     PublicFolderItemProcessor.CatchAndLogStorageExceptions(assistantLogger, folderRec, "HardDeleteSubFolders", delegate
     {
         using (Folder folder = PublicFolderItemProcessor.xsoFactory.BindToFolder(this.publicFolderSession, folderRec.FolderId) as Folder)
         {
             using (QueryResult queryResult = folder.FolderQuery(FolderQueryFlags.NoNotifications, null, null, PublicFolderItemProcessor.FolderRec.PropertiesToLoad))
             {
                 for (;;)
                 {
                     object[][] rows = queryResult.GetRows(100);
                     if (rows == null || rows.Length == 0)
                     {
                         break;
                     }
                     List <StoreObjectId> list = null;
                     foreach (object[] properties in rows)
                     {
                         PublicFolderItemProcessor.FolderRec folderRec2 = new PublicFolderItemProcessor.FolderRec(this.publicFolderSession, properties);
                         if (folderRec2.FolderId != null && folderRec2.LastModifiedTime < expiration)
                         {
                             if (list == null)
                             {
                                 list = new List <StoreObjectId>(rows.Length);
                             }
                             list.Add(folderRec2.FolderId);
                         }
                     }
                     if (list != null)
                     {
                         folder.DeleteObjects(DeleteItemFlags.HardDelete, list.ToArray());
                         assistantLogger.LogEvent(LogEventType.Success, string.Format(CultureInfo.InvariantCulture, "HardDeleteSubFolders. {0}. {1}", new object[]
                         {
                             folderRec.FolderId.ToHexEntryId(),
                             list.Count
                         }));
                     }
                 }
             }
         }
     });
 }