/// <summary> /// Initializes a new instance of the <see cref="CommittedEvent"/> class. /// </summary> /// <param name="eventLogSequenceNumber">The sequence number of the Event Log the Event was committed to.</param> /// <param name="occurred">The <see cref="DateTimeOffset" /> when the Event was committed to the Event Store.</param> /// <param name="eventSource">The <see cref="EventSourceId" />.</param> /// <param name="executionContext">The current <see cref="ExecutionContext" /> when this event was committed.</param> /// <param name="type">The <see cref="Artifact"/> representing the type of the Event.</param> /// <param name="isPublic">Whether this Event is public.</param> /// <param name="content">The content of the Event represented as a JSON-encoded <see cref="string"/>.</param> public CommittedEvent( EventLogSequenceNumber eventLogSequenceNumber, DateTimeOffset occurred, EventSourceId eventSource, ExecutionContext executionContext, Artifact type, bool isPublic, string content) : base(eventSource, type, isPublic, content) { EventLogSequenceNumber = eventLogSequenceNumber; Occurred = occurred; ExecutionContext = executionContext; }
/// <summary> /// Initializes a new instance of the <see cref="CommittedAggregateEvent"/> class. /// </summary> /// <param name="aggregateRoot">The aggregate root <see cref="Artifact" />.</param> /// <param name="aggregateRootVersion">The version of the aggregate root that applied the Event.</param> /// <param name="eventLogSequenceNumber">The version of the Event Log the Event was committed to.</param> /// <param name="occurred">The <see cref="DateTimeOffset" /> when the Event was committed to the Event Store.</param> /// <param name="eventSource">The Event Source that the Event was applied to.</param> /// <param name="executionContext">The <see cref="ExecutionContext" />.</param> /// <param name="type">The <see cref="Artifact"/> representing the type of the Event.</param> /// <param name="isPublic">Whether this Event is public.</param> /// <param name="content">The content of the Event represented as a JSON-encoded <see cref="string"/>.</param> public CommittedAggregateEvent( Artifact aggregateRoot, AggregateRootVersion aggregateRootVersion, EventLogSequenceNumber eventLogSequenceNumber, DateTimeOffset occurred, EventSourceId eventSource, ExecutionContext executionContext, Artifact type, bool isPublic, string content) : base(eventLogSequenceNumber, occurred, eventSource, executionContext, type, isPublic, content) { AggregateRoot = aggregateRoot; AggregateRootVersion = aggregateRootVersion; }
/// <summary> /// Initializes a new instance of the <see cref="CommittedExternalEvent"/> class. /// </summary> /// <param name="eventLogSequenceNumber">The <see cref="EventLogSequenceNumber" />.</param> /// <param name="occurred">The <see cref="DateTimeOffset" /> of when the Event was committed.</param> /// <param name="eventSource">The <see cref="EventSourceId" />.</param> /// <param name="executionContext">THe <see cref="ExecutionContext" />.</param> /// <param name="type">The <see cref="Artifact" />.</param> /// <param name="isPublic">Whether the event is public.</param> /// <param name="content">The Event content.</param> /// <param name="externalEventLogSequenceNumber">The external <see cref="EventLogSequenceNumber" />.</param> /// <param name="received">The <see cref="DateTimeOffset" /> that this external Event was received.</param> /// <param name="consent">The <see cref="Consent" />.</param> public CommittedExternalEvent( EventLogSequenceNumber eventLogSequenceNumber, DateTimeOffset occurred, EventSourceId eventSource, ExecutionContext executionContext, Artifact type, bool isPublic, string content, EventLogSequenceNumber externalEventLogSequenceNumber, DateTimeOffset received, ConsentId consent) : base(eventLogSequenceNumber, occurred, eventSource, executionContext, type, isPublic, content) { ExternalEventLogSequenceNumber = externalEventLogSequenceNumber; Received = received; Consent = consent; }
/// <summary> /// Initializes a new instance of the <see cref="EventLogSequenceIsOutOfOrder"/> class. /// </summary> /// <param name="sequenceNumber">The <see cref="EventLogSequenceNumber"/> the Event was committed to.</param> /// <param name="expectedSequenceNumber">Expected <see cref="EventLogSequenceNumber"/>.</param> public EventLogSequenceIsOutOfOrder(EventLogSequenceNumber sequenceNumber, EventLogSequenceNumber expectedSequenceNumber) : base($"Event Log Sequence is out of order because Event Log Sequence Number '{sequenceNumber}' is not greater than '{expectedSequenceNumber}'.") { }