public override void CopyFolderProperties(FolderRecWrapper sourceFolderRecWrapper, ISourceFolder sourceFolder, IDestinationFolder destFolder, FolderRecDataFlags dataToCopy, out bool wasPropertyCopyingSkipped) { wasPropertyCopyingSkipped = false; if (this.sessionSpecificEntryIds.ContainsKey(sourceFolderRecWrapper.EntryId) && destFolder != null) { if (base.SupportsPerUserReadUnreadDataTransfer) { using (IFxProxy fxProxy = destFolder.GetFxProxy(FastTransferFlags.PassThrough)) { using (IFxProxy fxProxy2 = base.CreateFxProxyTransmissionPipeline(fxProxy)) { sourceFolder.CopyTo(fxProxy2, CopyPropertiesFlags.CopyFolderPerUserData, Array <PropTag> .Empty); } } } base.CopyFolderProperties(sourceFolderRecWrapper, sourceFolder, destFolder, FolderRecDataFlags.Rules, out wasPropertyCopyingSkipped); } }
public void FinalSyncCopyMailboxData() { if (base.MRSJob.TestIntegration.RemoteExchangeGuidOverride == Guid.Empty) { using (IFxProxy fxProxy = base.DestMailbox.GetFxProxy()) { using (IFxProxy fxProxy2 = base.CreateFxProxyTransmissionPipeline(fxProxy)) { base.SourceMailbox.CopyTo(fxProxy2, new PropTag[] { PropTag.ContainerHierarchy, PropTag.ContainerContents }); } } if (this.ServerSupportsInferencePropertiesMove(base.SourceMailboxWrapper.MailboxVersion) && this.ServerSupportsInferencePropertiesMove(base.DestMailboxWrapper.MailboxVersion) && base.MRSJob.GetConfig <bool>("CopyInferenceProperties")) { byte[] badItemId = BitConverter.GetBytes(base.SourceMailbox.GetHashCode()); CommonUtils.ProcessKnownExceptions(delegate { List <PropValueData> list = new List <PropValueData>(2); foreach (PropValueData propValueData in this.SourceMailbox.GetProps(MailboxMover.inferencePropertiesToMove)) { if (((PropTag)propValueData.PropTag).ValueType() != PropType.Error) { list.Add(propValueData); } } badItemId = BadMessageRec.ComputeKey(list.ToArray()); if (!this.SyncState.BadItems.ContainsKey(badItemId)) { this.DestMailbox.SetProps(list.ToArray()); } }, delegate(Exception failure) { if (MapiUtils.IsBadItemIndicator(failure)) { List <BadMessageRec> list = new List <BadMessageRec>(1); list.Add(BadMessageRec.InferenceData(failure, badItemId)); this.ReportBadItems(list); return(true); } return(false); }); } } if (base.SupportsPerUserReadUnreadDataTransfer) { base.Report.Append(MrsStrings.ReportCopyPerUserReadUnreadDataStarted); using (ISourceFolder folder = base.SourceMailbox.GetFolder(null)) { using (IDestinationFolder folder2 = base.DestMailbox.GetFolder(null)) { using (IFxProxy fxProxy3 = folder2.GetFxProxy(FastTransferFlags.PassThrough)) { using (IFxProxy fxProxy4 = base.CreateFxProxyTransmissionPipeline(fxProxy3)) { folder.CopyTo(fxProxy4, CopyPropertiesFlags.CopyMailboxPerUserData, Array <PropTag> .Empty); } } } } base.Report.Append(MrsStrings.ReportCopyPerUserReadUnreadDataCompleted); } }