Example #1
0
        public int GetUpdateCount(MessageUpdateType updateType)
        {
            int num = 0;

            foreach (FolderUpdates folderUpdates in this.folderData.Values)
            {
                num += folderUpdates.GetUpdateCount(updateType);
            }
            return(num);
        }
Example #2
0
        internal int GetUpdateCount(MessageUpdateType updateType)
        {
            List <byte[]> listForUpdateType = this.GetListForUpdateType(updateType, false);

            if (listForUpdateType == null)
            {
                return(0);
            }
            return(listForUpdateType.Count);
        }
Example #3
0
        public List <byte[]> GetListForUpdateType(MessageUpdateType updateType, bool createIfNeeded)
        {
            List <byte[]> result = null;

            switch (updateType)
            {
            case MessageUpdateType.Delete:
                result = this.GetOrCreateList(ref this.deletedMessages, createIfNeeded);
                break;

            case MessageUpdateType.SetRead:
                result = this.GetOrCreateList(ref this.readMessages, createIfNeeded);
                break;

            case MessageUpdateType.SetUnread:
                result = this.GetOrCreateList(ref this.unreadMessages, createIfNeeded);
                break;
            }
            return(result);
        }
Example #4
0
        public void AddMessage(byte[] folderId, byte[] messageId, MessageUpdateType updateType)
        {
            FolderUpdates folderUpdates = this[folderId];

            folderUpdates.GetListForUpdateType(updateType, true).Add(messageId);
        }