/*
        public void Snapshot(Guid id, int version, object snapshotEvent)
        {
            this.snapshots.Add(id, new InMemoryPersistenceMethod.AggregateSnapshot(id, version, snapshotEvent));
            this.eventStreams.Remove(id);
            this.eventStreams.Add(id, new EventStream(id, version, new List<object> { this.snapshots[id].SnapshotEvent }));
        } */

        public IEnumerable<Guid> GetAllIds()
        {
            if (this.currentSession != null)
            {
                return this.currentSession.GetAllIds();
            }

            using (var session = new InMemoryPersistenceSession(this.eventStreams, this.snapshots))
            {
                return session.GetAllIds();
            }
        }
        public EventStream GetById(Guid id)
        {
            if (this.currentSession != null)
            {
                return this.currentSession.GetById(id);
            }

            using (var session = new InMemoryPersistenceSession(this.eventStreams, this.snapshots))
            {
                return session.GetById(id);
            }
        }