コード例 #1
0
 // Token: 0x0600050C RID: 1292 RVA: 0x00025DFC File Offset: 0x00023FFC
 public void MoveToArchiveDumpster(DefaultFolderType folderType, List <ItemData> itemsToMove, ElcSubAssistant assistant, FolderArchiver folderArchiver, int totalFailuresSoFar, ref List <Exception> allExceptionsSoFar, out List <string> foldersWithErrors, out int newMoveErrorsTotal)
 {
     foldersWithErrors  = new List <string>();
     newMoveErrorsTotal = 0;
     if (this.archiveMailboxSession == null)
     {
         LocalArchiveProcessor.Tracer.TraceWarning <LocalArchiveProcessor>((long)this.GetHashCode(), "{0}: Could not open archive session for this mailbox", this);
         return;
     }
     assistant.EnableLoadTrackingOnSession(this.archiveMailboxSession);
     try
     {
         using (Folder folder = Folder.Bind(this.primaryMailboxSession, folderType))
         {
             using (Folder folder2 = Folder.Bind(this.archiveMailboxSession, folderType))
             {
                 if (folder2 != null)
                 {
                     LocalArchiveProcessor.Tracer.TraceDebug <LocalArchiveProcessor, DefaultFolderType>((long)this.GetHashCode(), "{0}: Was able to open target folder in the archive dumpster of type {1}. Will proceed to move in batches.", this, folderType);
                     this.ExpireInBatches(itemsToMove, folder, folder2, assistant, ExpirationExecutor.Action.MoveToArchiveDumpster, totalFailuresSoFar, ref allExceptionsSoFar, out foldersWithErrors, out newMoveErrorsTotal);
                 }
                 else
                 {
                     LocalArchiveProcessor.Tracer.TraceWarning <LocalArchiveProcessor, DefaultFolderType>((long)this.GetHashCode(), "{0}: Unable to open target folder in the archive dumpster of type {1}. Will not move anything to it (obviously).", this, folderType);
                 }
             }
         }
     }
     catch (ObjectNotFoundException arg)
     {
         LocalArchiveProcessor.Tracer.TraceError <LocalArchiveProcessor, ObjectNotFoundException>((long)this.GetHashCode(), "{0}: Dumpster folder does not exist in archive. Skipping move to archive dumpster for this run. Exception: {1}", this, arg);
     }
 }
コード例 #2
0
 // Token: 0x0600050D RID: 1293 RVA: 0x00025F00 File Offset: 0x00024100
 public void MoveToArchive(TagExpirationExecutor.ItemSet itemSet, ElcSubAssistant assistant, FolderArchiver folderArchiver, int totalFailuresSoFar, ref List <Exception> allExceptionsSoFar, out List <string> foldersWithErrors, out int newMoveErrorsTotal)
 {
     if (itemSet == null)
     {
         throw new ArgumentNullException("itemSet");
     }
     if (assistant == null)
     {
         throw new ArgumentNullException("assistant");
     }
     if (folderArchiver == null)
     {
         throw new ArgumentNullException("folderArchiver");
     }
     foldersWithErrors  = new List <string>();
     newMoveErrorsTotal = 0;
     if (this.archiveMailboxSession == null)
     {
         LocalArchiveProcessor.Tracer.TraceWarning <LocalArchiveProcessor>((long)this.GetHashCode(), "{0}: Could not open archive session for this mailbox", this);
         return;
     }
     assistant.EnableLoadTrackingOnSession(this.archiveMailboxSession);
     using (Folder folder = Folder.Bind(this.primaryMailboxSession, itemSet.FolderId))
     {
         if (folder != null)
         {
             FolderTuple archiveFolderTuple = folderArchiver.GetArchiveFolderTuple(folder.Id.ObjectId);
             if (archiveFolderTuple != null)
             {
                 using (Folder folder2 = Folder.Bind(this.archiveMailboxSession, archiveFolderTuple.FolderId))
                 {
                     if (folder2 != null)
                     {
                         LocalArchiveProcessor.Tracer.TraceDebug <LocalArchiveProcessor, string, string>((long)this.GetHashCode(), "{0}: Was able to open target folder {1} in the archive, corresponding to source folder {2}. Will proceed to move in batches.", this, folder2.DisplayName, folder.DisplayName);
                         this.ExpireInBatches(itemSet.Items, folder, folder2, assistant, ExpirationExecutor.Action.MoveToArchive, totalFailuresSoFar, ref allExceptionsSoFar, out foldersWithErrors, out newMoveErrorsTotal);
                     }
                     else
                     {
                         LocalArchiveProcessor.Tracer.TraceWarning <LocalArchiveProcessor, string>((long)this.GetHashCode(), "{0}: Unable to open target folder in the archive corresponding to source folder {1}. Will not move anything to it (obviously).", this, folder.DisplayName);
                     }
                     goto IL_14B;
                 }
             }
             LocalArchiveProcessor.Tracer.TraceWarning <LocalArchiveProcessor, string>((long)this.GetHashCode(), "{0}: Unable to get target folder in the archive corresponding to source folder {1}. Will not move anything to it (obviously).", this, folder.DisplayName);
         }
         else
         {
             LocalArchiveProcessor.Tracer.TraceWarning <LocalArchiveProcessor, string>((long)this.GetHashCode(), "{0}: Unable to open source folder {1}. Will not move anything from it (obviously).", this, itemSet.FolderId.ToHexEntryId());
         }
         IL_14B :;
     }
 }