Beispiel #1
0
        public Task <IMemento> GetMementoAsync(Guid aggregateId, int version = int.MaxValue)
        {
            var snapshot = _persistStreams.GetSnapshot(Bucket.Default, aggregateId, version);

            IMemento memento;

            if (snapshot != null)
            {
                memento = snapshot.Payload as IMemento;
            }
            else
            {
                memento = null;
            }

            return(Task.FromResult(memento));
        }
Beispiel #2
0
 public ISnapshot GetSnapshot(string bucketId, string streamId, int maxRevision)
 {
     return(_original.GetSnapshot(bucketId, streamId, maxRevision));
 }
 public virtual Snapshot GetSnapshot(string bucketId, string streamId, int maxRevision)
 {
     return(_persistence.GetSnapshot(bucketId, streamId, maxRevision));
 }
Beispiel #4
0
 public Snapshot GetSnapshot(Guid streamId, int maxRevision)
 {
     return(original.GetSnapshot(streamId, maxRevision));
 }
Beispiel #5
0
 public Task <ISnapshot> GetSnapshot(string bucketId, string streamId, int maxRevision)
 {
     return(_persistence.GetSnapshot(bucketId, streamId, maxRevision));
 }
 public ISnapshot GetSnapshot(string bucketId, string streamId, int maxRevision)
 {
     return(underlying.GetSnapshot(bucketId, streamId, maxRevision));
 }
 public virtual Snapshot GetSnapshot(Guid streamId, int maxRevision)
 {
     return(_persistence.GetSnapshot(streamId, maxRevision));
 }
 public void should_be_able_to_retrieve_the_snapshot()
 {
     persistence1.GetSnapshot(streamId, snapshot.StreamRevision).ShouldNotBeNull();
 }