Example #1
0
        public NotificationInfo Add(Notification notification)
        {
            var copy = notification.ValidateNew().Copy();

            copy.Id = LocalHelper.GenerateObjectId();
            copy.ServerTimestamp = Timestamp.GetCurrent();

            lock (_syncLock)
            {
                _notifications.Add(copy.Id, copy);
            }

            var result = copy.ToInfo();

            return(result);
        }