public virtual bool AddSnapshot(Snapshot snapshot) { bool result = _persistence.AddSnapshot(snapshot); if (result) { _counters.CountSnapshot(); } return(result); }
public async Task <bool> AddSnapshot(ISnapshot snapshot) { bool result = await _persistence.AddSnapshot(snapshot); if (result) { _counters.CountSnapshot(); } return(result); }
public Task SaveAsync(IMemento memento) { while (true) { try { _persistStreams.AddSnapshot(new Snapshot(memento.Id.ToString(), memento.Version, memento)); return(Task.CompletedTask); } catch (DuplicateCommitException ex) { throw ex; } catch (ConcurrencyException e) { throw new ConflictingCommandException(e.Message, e); } catch (StorageException e) { throw new PersistenceException(e.Message, e); } } }
public bool AddSnapshot(ISnapshot snapshot) { return(_original.AddSnapshot(snapshot)); }
public bool AddSnapshot(ISnapshot snapshot) { return(underlying.AddSnapshot(snapshot)); }
public Task <bool> AddSnapshot(ISnapshot snapshot) { return(_original.AddSnapshot(snapshot)); }
protected override void Because() { added = persistence1.AddSnapshot(snapshot); }