Beispiel #1
0
        public virtual void Save(Event theEvent)
        {
            _eventsDict.AddOrUpdate(theEvent.EventId, new ConcurrentBag <Event> {
                theEvent
            }, (x, list) =>
            {
                list.Add(theEvent);
                return(list);
            });

            var serializedData = JsonConvert.SerializeObject(theEvent);

            var storedEvent = new StoredEvent(
                theEvent,
                serializedData
                );

            EventStorageRepository.Store(storedEvent);
        }