Ejemplo n.º 1
0
        private void HashFolderMessages(WellKnownFolderType wkfType, HashSet <byte[]> hashset)
        {
            MrsTracer.Service.Debug("Enumerating target {0} folder to check for deleted messages", new object[]
            {
                wkfType
            });
            FolderMapping wellKnownFolder = this.DestHierarchy.GetWellKnownFolder(wkfType);

            if (wellKnownFolder != null)
            {
                using (IDestinationFolder folder = base.DestMailbox.GetFolder(wellKnownFolder.EntryId))
                {
                    if (folder != null)
                    {
                        List <MessageRec> list = folder.EnumerateMessages(EnumerateMessagesFlags.RegularMessages, this.GetEnumerateMessagesPropsForContentVerification(MailboxWrapperFlags.Target));
                        foreach (MessageRec messageRec in list)
                        {
                            byte[] array = messageRec[this.DestHierarchy.SourceEntryIDPtag] as byte[];
                            if (array != null && !hashset.Contains(array))
                            {
                                hashset.Add(array);
                            }
                        }
                    }
                }
            }
        }