Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventMetadata"/> class.
 /// </summary>
 /// <param name="eventId">An <see cref="EventId"/> that uniquely identifies this event.</param>
 /// <param name="versionedEventSource">The <see cref="VersionedEventSource" /> that this event applies to.</param>
 /// <param name="correlationId">A <see cref="CorrelationId" /> to relate this event to other artifacts and actions within the system.</param>
 /// <param name="artifact">The <see cref="Artifact" /> that represents this event.</param>
 /// <param name="occurred">A timestamp in the form of a <see cref="DateTimeOffset" /> recording when the <see cref="IEvent" /> occurred.</param>
 /// <param name="originalContext">The <see cref="OriginalContext" /> of the <see cref="IEvent" />.</param>
 public EventMetadata(EventId eventId, VersionedEventSource versionedEventSource, CorrelationId correlationId, Artifact artifact, DateTimeOffset occurred, OriginalContext originalContext)
 {
     Id = eventId;
     VersionedEventSource = versionedEventSource;
     CorrelationId        = correlationId;
     Artifact             = artifact;
     Occurred             = occurred;
     OriginalContext      = originalContext;
 }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public override bool Equals(EventMetadata other)
 {
     return
         (Id.Equals(other.Id) &&
          Artifact.Equals(other.Artifact) &&
          CorrelationId.Equals(other.CorrelationId) &&
          EventSourceId.Equals(other.EventSourceId) &&
          Occurred.LossyEquals(other.Occurred) &&
          OriginalContext.Equals(other.OriginalContext) &&
          VersionedEventSource.Equals(other.VersionedEventSource));
 }