public int GetUpdateCount(MessageUpdateType updateType) { int num = 0; foreach (FolderUpdates folderUpdates in this.folderData.Values) { num += folderUpdates.GetUpdateCount(updateType); } return(num); }
internal int GetUpdateCount(MessageUpdateType updateType) { List <byte[]> listForUpdateType = this.GetListForUpdateType(updateType, false); if (listForUpdateType == null) { return(0); } return(listForUpdateType.Count); }
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); }
public void AddMessage(byte[] folderId, byte[] messageId, MessageUpdateType updateType) { FolderUpdates folderUpdates = this[folderId]; folderUpdates.GetListForUpdateType(updateType, true).Add(messageId); }