IFxProxy IDestinationMailbox.GetFxProxy()
        {
            MrsTracer.ProxyClient.Function("RemoteDestinationMailbox.GetFxProxy", new object[0]);
            base.VerifyMailboxConnection();
            byte[]                  data;
            long                    handle             = base.MrsProxy.IDestinationMailbox_GetFxProxy(base.Handle, out data);
            IDataMessage            getDataResponseMsg = FxProxyGetObjectDataResponseMessage.Deserialize(DataMessageOpcode.FxProxyGetObjectDataResponse, data, base.MrsProxyClient.UseCompression);
            BufferedTransmitter     destination        = new BufferedTransmitter(new RemoteDataImport(base.MrsProxy, handle, getDataResponseMsg), base.ExportBufferSizeKB, true, base.MrsProxyClient.UseBuffering, base.MrsProxyClient.UseCompression);
            AsynchronousTransmitter destination2       = new AsynchronousTransmitter(destination, true);

            return(new FxProxyTransmitter(destination2, true));
        }
        IFxProxyPool IDestinationMailbox.GetFxProxyPool(ICollection <byte[]> folderIds)
        {
            MrsTracer.ProxyClient.Function("RemoteDestinationMailbox.GetFxProxyPool", new object[0]);
            base.VerifyMailboxConnection();
            List <byte[]> list = new List <byte[]>(folderIds);

            byte[]                  data;
            long                    handle             = base.MrsProxy.IDestinationMailbox_GetFxProxyPool(base.Handle, list.ToArray(), out data);
            IDataMessage            getDataResponseMsg = FxProxyPoolGetFolderDataResponseMessage.Deserialize(DataMessageOpcode.FxProxyPoolGetFolderDataResponse, data, base.MrsProxyClient.UseCompression);
            BufferedTransmitter     destination        = new BufferedTransmitter(new RemoteDataImport(base.MrsProxy, handle, getDataResponseMsg), base.ExportBufferSizeKB, true, base.MrsProxyClient.UseBuffering, base.MrsProxyClient.UseCompression);
            AsynchronousTransmitter destination2       = new AsynchronousTransmitter(destination, true);

            return(new FxProxyPoolTransmitter(destination2, true, base.ServerVersion));
        }
Ejemplo n.º 3
0
 public void MessageExport(ISourceMailbox mailbox, List <MessageRec> messages, ExportMessagesFlags flags, PropTag[] excludeProps)
 {
     this.RunExportThread(delegate
     {
         using (BufferedTransmitter bufferedTransmitter = new BufferedTransmitter(this, this.service.ExportBufferSizeFromMrsKB, false, this.service.UseBufferring, this.service.UseCompression))
         {
             using (AsynchronousTransmitter asynchronousTransmitter = new AsynchronousTransmitter(bufferedTransmitter, false))
             {
                 using (FxProxyPoolTransmitter fxProxyPoolTransmitter = new FxProxyPoolTransmitter(asynchronousTransmitter, false, this.service.ClientVersion))
                 {
                     mailbox.ExportMessages(messages, fxProxyPoolTransmitter, flags, null, excludeProps);
                 }
             }
         }
     });
 }
Ejemplo n.º 4
0
 public void MailboxExport(ISourceMailbox mailbox, PropTag[] excludeTags)
 {
     this.RunExportThread(delegate
     {
         using (BufferedTransmitter bufferedTransmitter = new BufferedTransmitter(this, this.service.ExportBufferSizeFromMrsKB, false, this.service.UseBufferring, this.service.UseCompression))
         {
             using (AsynchronousTransmitter asynchronousTransmitter = new AsynchronousTransmitter(bufferedTransmitter, false))
             {
                 using (FxProxyTransmitter fxProxyTransmitter = new FxProxyTransmitter(asynchronousTransmitter, false))
                 {
                     mailbox.CopyTo(fxProxyTransmitter, excludeTags);
                 }
             }
         }
     });
 }
Ejemplo n.º 5
0
 public void FolderExportMessages(ISourceFolder folder, CopyMessagesFlags flags, byte[][] entryIds)
 {
     this.RunExportThread(delegate
     {
         using (BufferedTransmitter bufferedTransmitter = new BufferedTransmitter(this, this.service.ExportBufferSizeFromMrsKB, false, this.service.UseBufferring, this.service.UseCompression))
         {
             using (AsynchronousTransmitter asynchronousTransmitter = new AsynchronousTransmitter(bufferedTransmitter, false))
             {
                 using (FxProxyTransmitter fxProxyTransmitter = new FxProxyTransmitter(asynchronousTransmitter, false))
                 {
                     folder.ExportMessages(fxProxyTransmitter, flags, entryIds);
                 }
             }
         }
     });
 }
Ejemplo n.º 6
0
 public void FoldersExport(ISourceMailbox mailbox, List <byte[]> folderIds, ExportFoldersDataToCopyFlags exportFoldersDataToCopyFlags, GetFolderRecFlags folderRecFlags, PropTag[] additionalFolderRecProps, CopyPropertiesFlags copyPropertiesFlags, PropTag[] excludeProps, AclFlags extendedAclFlags)
 {
     this.RunExportThread(delegate
     {
         using (BufferedTransmitter bufferedTransmitter = new BufferedTransmitter(this, this.service.ExportBufferSizeFromMrsKB, false, this.service.UseBufferring, this.service.UseCompression))
         {
             using (AsynchronousTransmitter asynchronousTransmitter = new AsynchronousTransmitter(bufferedTransmitter, false))
             {
                 using (FxProxyPoolTransmitter fxProxyPoolTransmitter = new FxProxyPoolTransmitter(asynchronousTransmitter, false, this.service.ClientVersion))
                 {
                     mailbox.ExportFolders(folderIds, fxProxyPoolTransmitter, exportFoldersDataToCopyFlags, folderRecFlags, additionalFolderRecProps, copyPropertiesFlags, excludeProps, extendedAclFlags);
                 }
             }
         }
     });
 }
Ejemplo n.º 7
0
 public void FolderExport(ISourceFolder folder, CopyPropertiesFlags flags, PropTag[] excludeTags)
 {
     this.RunExportThread(delegate
     {
         using (BufferedTransmitter bufferedTransmitter = new BufferedTransmitter(this, this.service.ExportBufferSizeFromMrsKB, false, this.service.UseBufferring, this.service.UseCompression))
         {
             using (AsynchronousTransmitter asynchronousTransmitter = new AsynchronousTransmitter(bufferedTransmitter, false))
             {
                 using (FxProxyTransmitter fxProxyTransmitter = new FxProxyTransmitter(asynchronousTransmitter, false))
                 {
                     folder.CopyTo(fxProxyTransmitter, flags, excludeTags);
                 }
             }
         }
     });
 }
        IFxProxy IDestinationFolder.GetFxProxy(FastTransferFlags flags)
        {
            byte[] data;
            long   handle;

            if (base.ServerVersion[30])
            {
                handle = base.MrsProxy.IDestinationFolder_GetFxProxy2(base.Handle, (int)flags, out data);
            }
            else
            {
                handle = base.MrsProxy.IDestinationFolder_GetFxProxy(base.Handle, out data);
            }
            IDataMessage            getDataResponseMsg = FxProxyGetObjectDataResponseMessage.Deserialize(DataMessageOpcode.FxProxyGetObjectDataResponse, data, base.MrsProxyClient.UseCompression);
            BufferedTransmitter     destination        = new BufferedTransmitter(new RemoteDataImport(base.MrsProxy, handle, getDataResponseMsg), this.exportBufferSizeKB, true, base.MrsProxyClient.UseBuffering, base.MrsProxyClient.UseCompression);
            AsynchronousTransmitter destination2       = new AsynchronousTransmitter(destination, true);

            return(new FxProxyTransmitter(destination2, true));
        }
Ejemplo n.º 9
0
 public void MessageExportWithBadMessageDetection(ISourceMailbox mailbox, List <MessageRec> messages, ExportMessagesFlags flags, PropTag[] excludeProps, bool isDownlevelClient)
 {
     this.RunExportThread(delegate
     {
         List <BadMessageRec> list = new List <BadMessageRec>();
         MapiUtils.ExportMessagesWithBadItemDetection(mailbox, messages, delegate
         {
             BufferedTransmitter destination      = new BufferedTransmitter(this, this.service.ExportBufferSizeFromMrsKB, false, this.service.UseBufferring, this.service.UseCompression);
             AsynchronousTransmitter destination2 = new AsynchronousTransmitter(destination, true);
             return(new FxProxyPoolTransmitter(destination2, true, this.service.ClientVersion));
         }, flags, null, excludeProps, TestIntegration.Instance, ref list);
         if (list != null && list.Count > 0)
         {
             MessageExportResultTransmitter messageExportResultTransmitter = new MessageExportResultTransmitter(this, isDownlevelClient);
             messageExportResultTransmitter.SendMessageExportResults(list);
             ((IDataImport)this).SendMessageAndWaitForReply(FlushMessage.Instance);
         }
     });
 }