private static Commit BuildCommit(GetEventStoreCommitAttempt.Dto dto, ResolvedEvent resolved) { return(new Commit(dto.BucketId, dto.StreamId, dto.StreamRevision, dto.CommitId, dto.CommitSequence, dto.CommitStamp, (resolved.OriginalEventNumber + 1).ToString(), dto.Headers, dto.Events)); }
private static bool SingleStreamIsInRange(GetEventStoreCommitAttempt.Dto dto, int minRevision, int maxRevision) { return(dto.StreamRevision >= minRevision && (dto.StreamRevision - dto.Events.Count + 1) <= maxRevision); }