private RillDetails( RillReference reference, Sequence sequence, Timestamp createdAt, Timestamp lastChangedAt) { Reference = reference; Sequence = sequence; CreatedAt = createdAt; LastChangedAt = lastChangedAt; }
public static RillDetails From( RillReference reference, Sequence sequence, Timestamp createdAt, Timestamp lastChangedAt) { if (lastChangedAt < createdAt) { throw new ArgumentException("Last changed can not take presence before Created timestamp."); } return(new RillDetails(reference, sequence, createdAt, lastChangedAt)); }
private RillCommit( RillReference reference, CommitId id, SequenceRange sequenceRange, Timestamp timestamp, IImmutableList <Event> events) { Id = id; Reference = reference; SequenceRange = sequenceRange; Timestamp = timestamp; Events = events; }
public static RillDetails New(RillReference reference, Timestamp?timestamp = default) { var ts = timestamp ?? Timestamp.New(); return(new RillDetails(reference, Sequence.None, ts, ts)); }
public static IRill Synchronous(RillReference reference) => new SynchronousRill(reference);
public static IAsyncRill Asynchronous(RillReference reference) => new AsynchronousRill(reference);
public static RillCommit From( RillReference reference, CommitId id, SequenceRange sequenceRange, Timestamp timestamp, IImmutableList <Event> events) => new(reference, id, sequenceRange, timestamp, RequireAtLeastOneEvent(events));