Example #1
0
        public void Save(AbstractEventSourced eventSourced)
        {
            this.eventStore.Save(eventSourced.Changes);
            this.eventBus.Publish(eventSourced.Changes);

            var snapshotable = eventSourced as ISnaphotable;

            if (snapshotable == null)
            {
                return;
            }

            try
            {
                this.snapshotKeeper.Snapshot(snapshotable);
            }
            catch
            {
            }
        }
 protected override void EstablishContext()
 {
     base.EstablishContext();
     this.EventSourced = A.Fake <AbstractEventSourced>();
 }