Exemple #1
0
        protected void RaiseEvent(IEvent e)
        {
            var versionedEvent = new VersionedEvent(Version + 1, e);

            ApplyEvent(versionedEvent);
            _uncommitedEvents.Add(versionedEvent);
        }
Exemple #2
0
 private void ApplyEvent(VersionedEvent e)
 {
     State   = _reducer(State, e.Event);
     Version = e.Version;
 }