-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
524 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/NKZSoft.Template.Application/Common/Mappings/AppCodeGenerationRegister.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
src/NKZSoft.Template.Application/TodoItems/Commands/Create/CreateTodoItemCommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/NKZSoft.Template.Application/TodoItems/Commands/Create/CreateToВoItemCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
namespace NKZSoft.Template.Application.TodoItems.Commands.Create; | ||
|
||
public sealed record CreateToВoItemCommand(string Title, int? ListId) : IRequest<IResult<Guid>>; | ||
public sealed record CreateToВoItemCommand(string Title, int? ListId) : IRequest<Result<Guid>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...Soft.Template.Application/TodoItems/EventHandlers/ToDoItemCreatedDomainEventBusHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace NKZSoft.Template.Application.TodoItems.EventHandlers; | ||
|
||
public sealed class ToDoItemCreatedDomainEventBusHandler : INotificationHandler<ToDoItemCreatedDomainEvent> | ||
{ | ||
private readonly ILogger<ToDoItemCreatedDomainEventBusHandler> _logger; | ||
private readonly IPublishEndpoint _publishEndpoint; | ||
private readonly IMapper _mapper; | ||
|
||
public ToDoItemCreatedDomainEventBusHandler(ILogger<ToDoItemCreatedDomainEventBusHandler> logger, | ||
IPublishEndpoint publishEndpoint, IMapper mapper) | ||
{ | ||
_mapper = mapper.ThrowIfNull(); | ||
_logger = logger.ThrowIfNull(); | ||
_publishEndpoint = publishEndpoint.ThrowIfNull(); | ||
} | ||
|
||
public async Task Handle(ToDoItemCreatedDomainEvent notification, CancellationToken cancellationToken) | ||
{ | ||
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name); | ||
|
||
var createEvent = await notification | ||
.BuildAdapter(_mapper.Config) | ||
.AdaptToTypeAsync<ToDoItemCreatedIntegrationEvent>() | ||
.ConfigureAwait(false); | ||
|
||
await _publishEndpoint.Publish(createEvent, cancellationToken) | ||
.ConfigureAwait(false); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...Soft.Template.Application/TodoItems/EventHandlers/ToDoItemUpdatedDomainEventBusHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace NKZSoft.Template.Application.TodoItems.EventHandlers; | ||
|
||
public sealed class ToDoItemUpdatedDomainEventBusHandler : INotificationHandler<ToDoItemUpdatedDomainEvent> | ||
{ | ||
private readonly ILogger<ToDoItemUpdatedDomainEventBusHandler> _logger; | ||
|
||
public ToDoItemUpdatedDomainEventBusHandler(ILogger<ToDoItemUpdatedDomainEventBusHandler> logger) => _logger = logger; | ||
|
||
public async Task Handle(ToDoItemUpdatedDomainEvent notification, CancellationToken cancellationToken) | ||
{ | ||
_logger.LogInformation("CleanArchitecture Domain Event: {DomainEvent}", notification.GetType().Name); | ||
|
||
await Task.CompletedTask; | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
src/NKZSoft.Template.Application/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
src/NKZSoft.Template.Application/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
src/NKZSoft.Template.Application/TodoItems/Queries/Get/GetTodoItemQueryHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...NKZSoft.Template.Application/TodoItems/Queries/GetQueryable/GetAllTodoItemQueryHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/NKZSoft.Template.Application/TodoItems/Specifications/ToDoSpecification.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.