Beispiel #1
0
        private void ReadRulesFromAllFolders()
        {
            List <FolderRec> list = ((IMailbox)this).EnumerateFolderHierarchy(EnumerateFolderHierarchyFlags.None, null);

            foreach (FolderRec folderRec in list)
            {
                if (folderRec.FolderType != FolderType.Search)
                {
                    using (MapiSourceFolder folder = base.GetFolder <MapiSourceFolder>(folderRec.EntryId))
                    {
                        if (folder == null)
                        {
                            MrsTracer.Provider.Debug("Folder {0} is missing in source while reading rules. Will sync its deletion later.", new object[]
                            {
                                TraceUtils.DumpEntryId(folderRec.EntryId)
                            });
                            break;
                        }
                        using (base.RHTracker.Start())
                        {
                            folder.Folder.GetRules(null);
                        }
                    }
                }
            }
        }
Beispiel #2
0
 private void FlushBatchToFolder(List <MessageRec> batch, IFxProxyPool proxyPool)
 {
     if (batch.Count == 0)
     {
         return;
     }
     MrsTracer.Provider.Function("MapiSourceMailbox.FlushBatchToFolder({0} messages)", new object[]
     {
         batch.Count
     });
     byte[] folderId = batch[0].FolderId;
     using (MapiSourceFolder folder = base.GetFolder <MapiSourceFolder>(folderId))
     {
         if (folder == null)
         {
             MrsTracer.Provider.Debug("Folder {0} is missing in source. Will sync its deletion later.", new object[]
             {
                 TraceUtils.DumpEntryId(folderId)
             });
         }
         else
         {
             folder.CopyBatch(proxyPool, batch);
         }
     }
 }