Skip to content

Commit

Permalink
fix:取消集成事件默认Topic,可能引起命名冲突优化
Browse files Browse the repository at this point in the history
  • Loading branch information
duiapro committed May 9, 2024
1 parent c2ad5b0 commit 56ff183
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.Ddd.Domain.Tests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ public abstract record IntegrationDomainEvent(Guid EventId, DateTime EvenCreateT
protected IntegrationDomainEvent() : this(Guid.NewGuid(), DateTime.UtcNow)
{
// ReSharper disable once VirtualMemberCallInConstructor
if (string.IsNullOrWhiteSpace(Topic)) Topic = GetType().FullName ?? GetType().Name;
if (string.IsNullOrWhiteSpace(Topic)) Topic = GetType().Name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected IntegrationEvent() : this(Guid.NewGuid(), DateTime.UtcNow)

protected IntegrationEvent(Guid eventId, DateTime creationTime)
{
if (string.IsNullOrWhiteSpace(Topic)) Topic = GetType().FullName ?? GetType().Name;
if (string.IsNullOrWhiteSpace(Topic)) Topic = GetType().Name;

EventId = eventId;
EvenCreateTime = creationTime;
Expand Down

0 comments on commit 56ff183

Please sign in to comment.