// Token: 0x0600051F RID: 1311 RVA: 0x00026A70 File Offset: 0x00024C70 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; using (Folder folder = Folder.Bind(this.primaryMailboxSession, folderType)) { WellKnownFolderName folderName; if (this.archiveEwsDumpsterFolderMapping.TryGetValue(folderType, out folderName)) { Exception ex; Folder defaultFolder = this.EwsDataProvider.GetDefaultFolder(folderName, out ex); if (defaultFolder != null && ex == null) { RemoteArchiveProcessor.Tracer.TraceDebug <RemoteArchiveProcessor, 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, defaultFolder.DisplayName, folder.DisplayName); this.MoveItemsInBatches(itemsToMove, folder, defaultFolder, assistant, ExpirationExecutor.Action.MoveToArchiveDumpster, totalFailuresSoFar, ref allExceptionsSoFar, out foldersWithErrors, out newMoveErrorsTotal); } else { RemoteArchiveProcessor.Tracer.TraceWarning <RemoteArchiveProcessor, string, 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). Exception : {2}", this, folder.DisplayName, (ex == null) ? string.Empty : ex.ToString()); } } } }
// Token: 0x0600051E RID: 1310 RVA: 0x000269B4 File Offset: 0x00024BB4 public void MoveToArchive(TagExpirationExecutor.ItemSet itemSet, ElcSubAssistant assistant, FolderArchiver folderArchiver, int totalFailuresSoFar, ref List <Exception> allExceptionsSoFar, out List <string> foldersWithErrors, out int newMoveErrorsTotal) { foldersWithErrors = new List <string>(); newMoveErrorsTotal = 0; using (Folder folder = Folder.Bind(this.primaryMailboxSession, itemSet.FolderId)) { FolderTupleCrossServerArchive folderTupleCrossServerArchive = folderArchiver.GetArchiveFolderTuple(itemSet.FolderId) as FolderTupleCrossServerArchive; if (folderTupleCrossServerArchive != null) { RemoteArchiveProcessor.Tracer.TraceDebug <RemoteArchiveProcessor, 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, folderTupleCrossServerArchive.DisplayName, folder.DisplayName); this.MoveItemsInBatches(itemSet.Items, folder, folderTupleCrossServerArchive.Folder, assistant, ExpirationExecutor.Action.MoveToArchive, totalFailuresSoFar, ref allExceptionsSoFar, out foldersWithErrors, out newMoveErrorsTotal); } else { RemoteArchiveProcessor.Tracer.TraceWarning <RemoteArchiveProcessor, 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); } } }
// Token: 0x06000539 RID: 1337 RVA: 0x0002774C File Offset: 0x0002594C 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) { if (this.PrimaryEwsClient == null) { throw new ElcEwsException(ElcEwsErrorType.PrimaryExchangeWebServiceNotAvailable, "Primary EWS url is unknown."); } foldersWithErrors = new List <string>(); newMoveErrorsTotal = 0; if (this.IsCrossPremise && this.moveToArchiveTotalCount > this.MoveToArchiveTotalCountLimit) { RemoteArchiveProcessorBase.Tracer.TraceDebug <RemoteArchiveProcessorBase>((long)this.GetHashCode(), "{0}: Move to archive total count limit reached. No more item is moved to the archive mailbox during this run.", this); return; } using (Folder folder = Folder.Bind(this.primaryMailboxSession, folderType)) { DistinguishedFolderIdNameType id; if (RemoteArchiveProcessorBase.ArchiveEwsDumpsterFolderMapping.TryGetValue(folderType, out id)) { BaseFolderType baseFolderType = null; Exception ex = null; try { baseFolderType = this.ArchiveEwsClient.GetFolderById(new DistinguishedFolderIdType { Id = id }, this.FolderAllProperties.ToArray()); } catch (ElcEwsException ex2) { ex = ex2; } if (baseFolderType != null && ex == null) { RemoteArchiveProcessorBase.Tracer.TraceDebug <RemoteArchiveProcessorBase, 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, baseFolderType.DisplayName, folder.DisplayName); this.MoveItemsInBatches(itemsToMove, folder, baseFolderType, ExpirationExecutor.Action.MoveToArchiveDumpster, totalFailuresSoFar, ref allExceptionsSoFar, out foldersWithErrors, out newMoveErrorsTotal); } else { RemoteArchiveProcessorBase.Tracer.TraceWarning <RemoteArchiveProcessorBase, string, string>((long)this.GetHashCode(), "{0}: Unable to get target folder in the archive corresponding to source folder {1}. Will not move anything to it. Exception : {2}", this, folder.DisplayName, (ex == null) ? string.Empty : ex.ToString()); } } else { RemoteArchiveProcessorBase.Tracer.TraceDebug <RemoteArchiveProcessorBase, DefaultFolderType>((long)this.GetHashCode(), "{0}: Unable to find the corresponding archive dumpster folder for foler type {1}. Will not move anything to it.", this, folderType); } } }
// Token: 0x06000538 RID: 1336 RVA: 0x00027650 File Offset: 0x00025850 public void MoveToArchive(TagExpirationExecutor.ItemSet itemSet, ElcSubAssistant assistant, FolderArchiver folderArchiver, int totalFailuresSoFar, ref List <Exception> allExceptionsSoFar, out List <string> foldersWithErrors, out int newMoveErrorsTotal) { if (this.PrimaryEwsClient == null) { throw new ElcEwsException(ElcEwsErrorType.PrimaryExchangeWebServiceNotAvailable, "Primary EWS url is unknown."); } foldersWithErrors = new List <string>(); newMoveErrorsTotal = 0; if (this.IsCrossPremise && this.moveToArchiveTotalCount > this.MoveToArchiveTotalCountLimit) { RemoteArchiveProcessorBase.Tracer.TraceDebug <RemoteArchiveProcessorBase>((long)this.GetHashCode(), "{0}: Move to archive total count limit reached. No more item is moved to the archive mailbox during this run.", this); return; } using (Folder folder = Folder.Bind(this.primaryMailboxSession, itemSet.FolderId)) { FolderTupleRemoteArchive folderTupleRemoteArchive = folderArchiver.GetArchiveFolderTuple(itemSet.FolderId) as FolderTupleRemoteArchive; if (folderTupleRemoteArchive != null) { RemoteArchiveProcessorBase.Tracer.TraceDebug <RemoteArchiveProcessorBase, 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, folderTupleRemoteArchive.DisplayName, folder.DisplayName); this.MoveItemsInBatches(itemSet.Items, folder, folderTupleRemoteArchive.Folder, ExpirationExecutor.Action.MoveToArchive, totalFailuresSoFar, ref allExceptionsSoFar, out foldersWithErrors, out newMoveErrorsTotal); } else { RemoteArchiveProcessorBase.Tracer.TraceWarning <RemoteArchiveProcessorBase, string>((long)this.GetHashCode(), "{0}: Unable to get target folder in the archive corresponding to source folder {1}. Will not move anything to it.", this, folder.DisplayName); } } }
// 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 :; } }
// 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); } }