/// <summary> /// Equates this instance of <see cref="EventStream" /> to another. /// </summary> /// <param name="other"> The other <see cref="EventStream" /> to equate with.</param> /// <returns>true if equal, otherwise false.</returns> public bool Equals(EventStream other) { return(Equals(this, other)); }
/// <summary> /// A stream of events for a specific <see cref="EventSource" /> that represent an atomic commit /// </summary> /// <param name="id">The unique id in the form of a <see cref="CommitId" /></param> /// <param name="correlationId">A <see cref="CorrelationId" /> used to relate this event stream to other actions in the system</param> /// <param name="source">The <see cref="VersionedEventSource" /> that this stream applies to</param> /// <param name="timestamp">A timestamp in the form of a <see cref="DateTimeOffset" /> representing when the stream was committed</param> /// <param name="events">An <see cref="EventStream" /> representing the events (an enumerable of <see cref="EventEnvelope" />) that are committed in this commit</param> public UncommittedEventStream(CommitId id, CorrelationId correlationId, VersionedEventSource source, DateTimeOffset timestamp, EventStream events) { CorrelationId = correlationId; Ensure.IsNotNull(nameof(id), id); Ensure.IsNotNull(nameof(source), source); Ensure.IsNotNull(nameof(events), events); Id = id; Timestamp = timestamp; Source = source; CorrelationId = correlationId; Events = events; }
/// <summary> /// Equates two <see cref="EventStream" /> instances. /// </summary> /// <param name="first">The first <see cref="EventStream" /> instance.</param> /// <param name="second">The second <see cref="EventStream" /> instance.</param> /// <returns>true if equal, otherwise false.</returns> public static bool Equals(EventStream first, EventStream second) { return(_comparer.Equals(first, second)); }