void Remove(NotificationState notificationState, bool commit) { if (m_notificationDict.ContainsKey(notificationState.ObjectId)) { var state = m_notificationDict[notificationState.ObjectId]; m_orderedNotifications.Remove(state); } if (commit) { Save(); } OnUpdated(); }
private void Add(NotificationState notificationState, bool commit) { if (notificationState.ObjectId == 0) { throw new ArgumentException("Notification state must include an object ID"); } RemoveExcess(); if (!m_notificationDict.ContainsKey(notificationState.ObjectId)) { m_notificationDict[notificationState.ObjectId] = notificationState; m_orderedNotifications.Add(notificationState); } if (commit) { Save(); } OnUpdated(); }
private void Add(NotificationState notificationState) { Add(notificationState, true); }
public void Remove(NotificationState notificationState) { Remove(notificationState, true); }