Ejemplo n.º 1
0
        void ISourceMailbox.ExportFolders(List <byte[]> folderIds, IFxProxyPool proxyPool, ExportFoldersDataToCopyFlags exportFoldersDataToCopyFlags, GetFolderRecFlags folderRecFlags, PropTag[] additionalFolderRecProps, CopyPropertiesFlags copyPropertiesFlags, PropTag[] excludeProps, AclFlags extendedAclFlags)
        {
            string    text           = "ISourceMailbox.ExportFolders";
            TimeSpan  targetDuration = TimeSpan.Zero;
            Stopwatch stopwatch      = Stopwatch.StartNew();

            base.CreateContext(text, new DataContext[]
            {
                new EntryIDsDataContext(folderIds),
                new SimpleValueDataContext("exportFoldersDataToCopyFlags", exportFoldersDataToCopyFlags),
                new SimpleValueDataContext("folderRecFlags", folderRecFlags),
                new PropTagsDataContext(additionalFolderRecProps),
                new SimpleValueDataContext("copyPropertiesFlags", copyPropertiesFlags),
                new PropTagsDataContext(excludeProps),
                new SimpleValueDataContext("extendedAclFlags", extendedAclFlags)
            }).Execute(delegate
            {
                using (FxProxyPoolFxCallbackWrapper fxProxyPoolFxCallbackWrapper = new FxProxyPoolFxCallbackWrapper(proxyPool, true, delegate(TimeSpan duration)
                {
                    targetDuration += duration;
                }))
                {
                    ((ISourceMailbox)this.WrappedObject).ExportFolders(folderIds, fxProxyPoolFxCallbackWrapper, exportFoldersDataToCopyFlags, folderRecFlags, additionalFolderRecProps, copyPropertiesFlags, excludeProps, extendedAclFlags);
                }
            }, false);
            base.UpdateDuration(text, stopwatch.Elapsed.Subtract(targetDuration));
        }
Ejemplo n.º 2
0
        void ISourceMailbox.ExportMessages(List <MessageRec> messages, IFxProxyPool destProxies, ExportMessagesFlags flags, PropTag[] propsToCopyExplicitly, PropTag[] excludeProps)
        {
            string    text           = "ISourceMailbox.ExportMessages";
            TimeSpan  targetDuration = TimeSpan.Zero;
            Stopwatch stopwatch      = Stopwatch.StartNew();

            base.CreateContext(text, new DataContext[]
            {
                new SimpleValueDataContext("Flags", flags),
                new PropTagsDataContext(excludeProps)
            }).Execute(delegate
            {
                using (FxProxyPoolFxCallbackWrapper fxProxyPoolFxCallbackWrapper = new FxProxyPoolFxCallbackWrapper(destProxies, true, delegate(TimeSpan duration)
                {
                    targetDuration += duration;
                }))
                {
                    ((ISourceMailbox)this.WrappedObject).ExportMessages(messages, fxProxyPoolFxCallbackWrapper, flags, propsToCopyExplicitly, excludeProps);
                }
            }, false);
            base.UpdateDuration(text, stopwatch.Elapsed.Subtract(targetDuration));
        }