Skip to content

Commit

Permalink
chore: Remove old OccuredAt property on DomainEvent (#1758)
Browse files Browse the repository at this point in the history
Previous release pushed to all environments, all outbox messages tables
checked
  • Loading branch information
oskogstad authored Jan 29, 2025
1 parent 4b9bad0 commit 67ee75d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ public abstract record DomainEvent : IDomainEvent
public Guid EventId { get; private set; } = Guid.NewGuid();

[JsonInclude]
public DateTimeOffset OccuredAt { get; set; }

[JsonInclude]
public DateTimeOffset OccurredAt
{
get => OccuredAt;
set => OccuredAt = value;
}
public DateTimeOffset OccurredAt { get; set; }

[JsonInclude]
public Dictionary<string, string> Metadata { get; set; } = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,7 @@ public interface IDomainEvent : INotification
/// <summary>
/// The time at which the event, as well as all the actual changes, occurred.
/// </summary>
[Obsolete($"Use {nameof(OccurredAt)} instead")]
DateTimeOffset OccuredAt { get; set; }

/// <summary>
/// The time at which the event, as well as all the actual changes, occurred.
/// </summary>
DateTimeOffset OccurredAt
{
// Will be removed once all events in the database/on the bus have been consumed
#pragma warning disable CS0618 // Type or member is obsolete
get => OccuredAt;
set => OccuredAt = value;
#pragma warning restore CS0618 // Type or member is obsolete
}
DateTimeOffset OccurredAt { get; set; }

/// <summary>
/// Dictionary of metadata.
Expand Down

0 comments on commit 67ee75d

Please sign in to comment.