From 35831e5c7300229373ef5e2825b165655ea288f9 Mon Sep 17 00:00:00 2001 From: Nadir Badnjevic Date: Wed, 17 Jan 2024 21:35:31 +0100 Subject: [PATCH] refactor: fix build warnings --- src/Api/Api.csproj | 6 ++++++ src/Api/Program.cs | 4 +++- src/Application/Application.csproj | 6 ++++++ src/Application/Common/AuditableEntity.cs | 2 +- .../Common/Behaviours/PerformanceBehaviour.cs | 2 +- .../Common/Behaviours/UnhandledExceptionBehaviour.cs | 2 +- src/Application/Common/Behaviours/ValidationBehaviour.cs | 2 +- src/Application/Common/DomainEvent.cs | 2 +- .../Common/Exceptions/ForbiddenAccessException.cs | 2 +- src/Application/Common/Exceptions/NotFoundException.cs | 2 +- .../Common/Exceptions/UnsupportedColourException.cs | 2 +- src/Application/Common/Exceptions/ValidationException.cs | 2 +- src/Application/Common/Interfaces/ICsvFileBuilder.cs | 2 +- src/Application/Common/Interfaces/ICurrentUserService.cs | 2 +- src/Application/Common/Interfaces/IDateTime.cs | 2 +- src/Application/Common/Interfaces/IDomainEventService.cs | 2 +- src/Application/Common/Mappings/IMapFrom.cs | 2 +- src/Application/Common/Mappings/MappingExtensions.cs | 2 +- src/Application/Common/Mappings/MappingProfile.cs | 2 +- src/Application/Common/Models/DomainEventNotification.cs | 2 +- src/Application/Common/Models/PaginatedList.cs | 2 +- src/Application/Common/Models/Result.cs | 2 +- src/Application/Common/Security/AuthorizeAttribute.cs | 2 +- src/Application/Common/ValueObject.cs | 2 +- src/Application/ConfigureServices.cs | 2 +- src/Application/Domain/Todos/TodoItem.cs | 2 +- src/Application/Domain/Todos/TodoList.cs | 2 +- src/Application/Domain/ValueObjects/Colour.cs | 2 +- src/Application/Features/TodoItems/DeleteTodoItem.cs | 8 +------- .../EventHandlers/TodoItemCompletedEventHandler.cs | 2 +- .../EventHandlers/TodoItemCreatedEventHandler.cs | 2 +- .../Features/TodoItems/GetTodoItemsWithPagination.cs | 2 +- src/Application/Features/TodoItems/UpdateTodoItem.cs | 7 +------ .../Features/TodoItems/UpdateTodoItemDetail.cs | 7 +------ src/Application/Features/TodoLists/CreateTodoList.cs | 2 +- src/Application/Features/TodoLists/DeleteTodoList.cs | 9 ++------- src/Application/Features/TodoLists/ExportTodos.cs | 2 +- src/Application/Features/TodoLists/GetTodos.cs | 2 +- src/Application/Features/TodoLists/UpdateTodoList.cs | 9 ++------- src/Application/Infrastructure/Files/CsvFileBuilder.cs | 2 +- .../Infrastructure/Files/Maps/TodoItemRecordMap.cs | 2 +- .../Infrastructure/Persistence/ApplicationDbContext.cs | 2 +- .../Persistence/ApplicationDbContextSeed.cs | 2 +- .../Persistence/Configurations/TodoItemConfiguration.cs | 2 +- .../Persistence/Configurations/TodoListConfiguration.cs | 2 +- .../Migrations/20220322201554_InitialMigration.cs | 2 +- .../Infrastructure/Services/DateTimeService.cs | 2 +- .../Infrastructure/Services/DomainEventService.cs | 2 +- 48 files changed, 62 insertions(+), 74 deletions(-) diff --git a/src/Api/Api.csproj b/src/Api/Api.csproj index add1450..fe91ab8 100644 --- a/src/Api/Api.csproj +++ b/src/Api/Api.csproj @@ -13,6 +13,12 @@ false + + + true + $(NoWarn);CS1591;CS1573 + + diff --git a/src/Api/Program.cs b/src/Api/Program.cs index 588fe20..7ef5f52 100644 --- a/src/Api/Program.cs +++ b/src/Api/Program.cs @@ -55,4 +55,6 @@ app.UseAuthorization(); app.MapControllers(); -app.Run(); \ No newline at end of file +app.Run(); + +public partial class Program { } \ No newline at end of file diff --git a/src/Application/Application.csproj b/src/Application/Application.csproj index 53415ba..e1d5731 100644 --- a/src/Application/Application.csproj +++ b/src/Application/Application.csproj @@ -12,6 +12,12 @@ false + + + true + $(NoWarn);CS1591;CS1573 + + diff --git a/src/Application/Common/AuditableEntity.cs b/src/Application/Common/AuditableEntity.cs index 95a9b6f..a1c80ba 100644 --- a/src/Application/Common/AuditableEntity.cs +++ b/src/Application/Common/AuditableEntity.cs @@ -9,4 +9,4 @@ public abstract class AuditableEntity public DateTime? LastModified { get; set; } public string? LastModifiedBy { get; set; } -} +} \ No newline at end of file diff --git a/src/Application/Common/Behaviours/PerformanceBehaviour.cs b/src/Application/Common/Behaviours/PerformanceBehaviour.cs index c7d31b2..f1a3c1b 100644 --- a/src/Application/Common/Behaviours/PerformanceBehaviour.cs +++ b/src/Application/Common/Behaviours/PerformanceBehaviour.cs @@ -45,4 +45,4 @@ public async Task Handle(TRequest request, RequestHandlerDelegate Handle(TRequest request, RequestHandlerDelegate Handle(TRequest request, RequestHandlerDelegate failures) } public IDictionary Errors { get; } -} +} \ No newline at end of file diff --git a/src/Application/Common/Interfaces/ICsvFileBuilder.cs b/src/Application/Common/Interfaces/ICsvFileBuilder.cs index 60fb863..0dd1566 100644 --- a/src/Application/Common/Interfaces/ICsvFileBuilder.cs +++ b/src/Application/Common/Interfaces/ICsvFileBuilder.cs @@ -5,4 +5,4 @@ namespace VerticalSliceArchitecture.Application.Common.Interfaces; public interface ICsvFileBuilder { byte[] BuildTodoItemsFile(IEnumerable records); -} +} \ No newline at end of file diff --git a/src/Application/Common/Interfaces/ICurrentUserService.cs b/src/Application/Common/Interfaces/ICurrentUserService.cs index 9239f3b..459c1bd 100644 --- a/src/Application/Common/Interfaces/ICurrentUserService.cs +++ b/src/Application/Common/Interfaces/ICurrentUserService.cs @@ -3,4 +3,4 @@ public interface ICurrentUserService { string? UserId { get; } -} +} \ No newline at end of file diff --git a/src/Application/Common/Interfaces/IDateTime.cs b/src/Application/Common/Interfaces/IDateTime.cs index dfbb330..8e8aeae 100644 --- a/src/Application/Common/Interfaces/IDateTime.cs +++ b/src/Application/Common/Interfaces/IDateTime.cs @@ -3,4 +3,4 @@ public interface IDateTime { DateTime Now { get; } -} +} \ No newline at end of file diff --git a/src/Application/Common/Interfaces/IDomainEventService.cs b/src/Application/Common/Interfaces/IDomainEventService.cs index 85b86dd..13726cd 100644 --- a/src/Application/Common/Interfaces/IDomainEventService.cs +++ b/src/Application/Common/Interfaces/IDomainEventService.cs @@ -3,4 +3,4 @@ public interface IDomainEventService { Task Publish(DomainEvent domainEvent); -} +} \ No newline at end of file diff --git a/src/Application/Common/Mappings/IMapFrom.cs b/src/Application/Common/Mappings/IMapFrom.cs index 733ddba..79a20ac 100644 --- a/src/Application/Common/Mappings/IMapFrom.cs +++ b/src/Application/Common/Mappings/IMapFrom.cs @@ -8,4 +8,4 @@ void Mapping(Profile profile) { profile.CreateMap(typeof(T), GetType()); } -} +} \ No newline at end of file diff --git a/src/Application/Common/Mappings/MappingExtensions.cs b/src/Application/Common/Mappings/MappingExtensions.cs index eb62340..39d406b 100644 --- a/src/Application/Common/Mappings/MappingExtensions.cs +++ b/src/Application/Common/Mappings/MappingExtensions.cs @@ -18,4 +18,4 @@ public static Task> ProjectToListAsync(this IQu { return queryable.ProjectTo(configuration).ToListAsync(); } -} +} \ No newline at end of file diff --git a/src/Application/Common/Mappings/MappingProfile.cs b/src/Application/Common/Mappings/MappingProfile.cs index fa43cd4..2c46ab4 100644 --- a/src/Application/Common/Mappings/MappingProfile.cs +++ b/src/Application/Common/Mappings/MappingProfile.cs @@ -29,4 +29,4 @@ private void ApplyMappingsFromAssembly(Assembly assembly) } } -} +} \ No newline at end of file diff --git a/src/Application/Common/Models/DomainEventNotification.cs b/src/Application/Common/Models/DomainEventNotification.cs index 532af4a..29de313 100644 --- a/src/Application/Common/Models/DomainEventNotification.cs +++ b/src/Application/Common/Models/DomainEventNotification.cs @@ -10,4 +10,4 @@ public DomainEventNotification(TDomainEvent domainEvent) } public TDomainEvent DomainEvent { get; } -} +} \ No newline at end of file diff --git a/src/Application/Common/Models/PaginatedList.cs b/src/Application/Common/Models/PaginatedList.cs index f80edee..cfc0b33 100644 --- a/src/Application/Common/Models/PaginatedList.cs +++ b/src/Application/Common/Models/PaginatedList.cs @@ -28,4 +28,4 @@ public static async Task> CreateAsync(IQueryable source, int return new PaginatedList(items, count, pageNumber, pageSize); } -} +} \ No newline at end of file diff --git a/src/Application/Common/Models/Result.cs b/src/Application/Common/Models/Result.cs index 1f5d549..ed3bf39 100644 --- a/src/Application/Common/Models/Result.cs +++ b/src/Application/Common/Models/Result.cs @@ -21,4 +21,4 @@ public static Result Failure(IEnumerable errors) { return new Result(false, errors); } -} +} \ No newline at end of file diff --git a/src/Application/Common/Security/AuthorizeAttribute.cs b/src/Application/Common/Security/AuthorizeAttribute.cs index 9938b8b..2916fca 100644 --- a/src/Application/Common/Security/AuthorizeAttribute.cs +++ b/src/Application/Common/Security/AuthorizeAttribute.cs @@ -20,4 +20,4 @@ public AuthorizeAttribute() { } /// Gets or sets the policy name that determines access to the resource. /// public string Policy { get; set; } = string.Empty; -} +} \ No newline at end of file diff --git a/src/Application/Common/ValueObject.cs b/src/Application/Common/ValueObject.cs index 2cb8147..8a28aa6 100644 --- a/src/Application/Common/ValueObject.cs +++ b/src/Application/Common/ValueObject.cs @@ -39,4 +39,4 @@ public override int GetHashCode() .Select(x => x != null ? x.GetHashCode() : 0) .Aggregate((x, y) => x ^ y); } -} +} \ No newline at end of file diff --git a/src/Application/ConfigureServices.cs b/src/Application/ConfigureServices.cs index a66d98f..a07e2e6 100644 --- a/src/Application/ConfigureServices.cs +++ b/src/Application/ConfigureServices.cs @@ -55,4 +55,4 @@ public static IServiceCollection AddInfrastructure(this IServiceCollection servi return services; } -} +} \ No newline at end of file diff --git a/src/Application/Domain/Todos/TodoItem.cs b/src/Application/Domain/Todos/TodoItem.cs index 915cfbb..f959738 100644 --- a/src/Application/Domain/Todos/TodoItem.cs +++ b/src/Application/Domain/Todos/TodoItem.cs @@ -60,4 +60,4 @@ public class TodoItemRecord : IMapFrom public string? Title { get; set; } public bool Done { get; set; } -} +} \ No newline at end of file diff --git a/src/Application/Domain/Todos/TodoList.cs b/src/Application/Domain/Todos/TodoList.cs index dfad45c..5a2e49b 100644 --- a/src/Application/Domain/Todos/TodoList.cs +++ b/src/Application/Domain/Todos/TodoList.cs @@ -12,4 +12,4 @@ public class TodoList : AuditableEntity public Colour Colour { get; set; } = Colour.White; public IList Items { get; private set; } = new List(); -} +} \ No newline at end of file diff --git a/src/Application/Domain/ValueObjects/Colour.cs b/src/Application/Domain/ValueObjects/Colour.cs index d550bfc..6cbd804 100644 --- a/src/Application/Domain/ValueObjects/Colour.cs +++ b/src/Application/Domain/ValueObjects/Colour.cs @@ -77,4 +77,4 @@ protected override IEnumerable GetEqualityComponents() { yield return Code; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoItems/DeleteTodoItem.cs b/src/Application/Features/TodoItems/DeleteTodoItem.cs index b50881d..39f480c 100644 --- a/src/Application/Features/TodoItems/DeleteTodoItem.cs +++ b/src/Application/Features/TodoItems/DeleteTodoItem.cs @@ -37,13 +37,7 @@ public DeleteTodoItemCommandHandler(ApplicationDbContext context) public async Task Handle(DeleteTodoItemCommand request, CancellationToken cancellationToken) { var entity = await _context.TodoItems - .FindAsync(new object[] { request.Id }, cancellationToken); - - if (entity == null) - { - throw new NotFoundException(nameof(TodoItem), request.Id); - } - + .FindAsync(new object[] { request.Id }, cancellationToken) ?? throw new NotFoundException(nameof(TodoItem), request.Id); _context.TodoItems.Remove(entity); entity.DomainEvents.Add(new TodoItemDeletedEvent(entity)); diff --git a/src/Application/Features/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs b/src/Application/Features/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs index 9443ae7..491870c 100644 --- a/src/Application/Features/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs +++ b/src/Application/Features/TodoItems/EventHandlers/TodoItemCompletedEventHandler.cs @@ -24,4 +24,4 @@ public Task Handle(DomainEventNotification notification, return Task.CompletedTask; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs b/src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs index d74e87f..d3e2dad 100644 --- a/src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs +++ b/src/Application/Features/TodoItems/EventHandlers/TodoItemCreatedEventHandler.cs @@ -23,4 +23,4 @@ public Task Handle(DomainEventNotification notification, C return Task.CompletedTask; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoItems/GetTodoItemsWithPagination.cs b/src/Application/Features/TodoItems/GetTodoItemsWithPagination.cs index d7e7f83..2114bad 100644 --- a/src/Application/Features/TodoItems/GetTodoItemsWithPagination.cs +++ b/src/Application/Features/TodoItems/GetTodoItemsWithPagination.cs @@ -76,4 +76,4 @@ public class TodoItemBriefDto : IMapFrom public string? Title { get; set; } public bool Done { get; set; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoItems/UpdateTodoItem.cs b/src/Application/Features/TodoItems/UpdateTodoItem.cs index 35c9137..8fffa60 100644 --- a/src/Application/Features/TodoItems/UpdateTodoItem.cs +++ b/src/Application/Features/TodoItems/UpdateTodoItem.cs @@ -58,12 +58,7 @@ public UpdateTodoItemCommandHandler(ApplicationDbContext context) public async Task Handle(UpdateTodoItemCommand request, CancellationToken cancellationToken) { var entity = await _context.TodoItems - .FindAsync(new object[] { request.Id }, cancellationToken); - - if (entity == null) - { - throw new NotFoundException(nameof(TodoItem), request.Id); - } + .FindAsync(new object[] { request.Id }, cancellationToken) ?? throw new NotFoundException(nameof(TodoItem), request.Id); entity.Title = request.Title; entity.Done = request.Done; diff --git a/src/Application/Features/TodoItems/UpdateTodoItemDetail.cs b/src/Application/Features/TodoItems/UpdateTodoItemDetail.cs index de9c077..159ea59 100644 --- a/src/Application/Features/TodoItems/UpdateTodoItemDetail.cs +++ b/src/Application/Features/TodoItems/UpdateTodoItemDetail.cs @@ -48,12 +48,7 @@ public UpdateTodoItemDetailCommandHandler(ApplicationDbContext context) public async Task Handle(UpdateTodoItemDetailCommand request, CancellationToken cancellationToken) { var entity = await _context.TodoItems - .FindAsync(new object[] { request.Id }, cancellationToken); - - if (entity == null) - { - throw new NotFoundException(nameof(TodoItem), request.Id); - } + .FindAsync(new object[] { request.Id }, cancellationToken) ?? throw new NotFoundException(nameof(TodoItem), request.Id); entity.ListId = request.ListId; entity.Priority = request.Priority; diff --git a/src/Application/Features/TodoLists/CreateTodoList.cs b/src/Application/Features/TodoLists/CreateTodoList.cs index 45007c5..0dd2f67 100644 --- a/src/Application/Features/TodoLists/CreateTodoList.cs +++ b/src/Application/Features/TodoLists/CreateTodoList.cs @@ -65,4 +65,4 @@ public async Task Handle(CreateTodoListCommand request, CancellationToken c return entity.Id; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoLists/DeleteTodoList.cs b/src/Application/Features/TodoLists/DeleteTodoList.cs index be22e2b..07ffcdf 100644 --- a/src/Application/Features/TodoLists/DeleteTodoList.cs +++ b/src/Application/Features/TodoLists/DeleteTodoList.cs @@ -39,12 +39,7 @@ public async Task Handle(DeleteTodoListCommand request, CancellationToken { var entity = await _context.TodoLists .Where(l => l.Id == request.Id) - .SingleOrDefaultAsync(cancellationToken); - - if (entity == null) - { - throw new NotFoundException(nameof(TodoList), request.Id); - } + .SingleOrDefaultAsync(cancellationToken) ?? throw new NotFoundException(nameof(TodoList), request.Id); _context.TodoLists.Remove(entity); @@ -52,4 +47,4 @@ public async Task Handle(DeleteTodoListCommand request, CancellationToken return Unit.Value; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoLists/ExportTodos.cs b/src/Application/Features/TodoLists/ExportTodos.cs index 06ff53e..da080c9 100644 --- a/src/Application/Features/TodoLists/ExportTodos.cs +++ b/src/Application/Features/TodoLists/ExportTodos.cs @@ -72,4 +72,4 @@ public async Task Handle(ExportTodosQuery request, CancellationTo return vm; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoLists/GetTodos.cs b/src/Application/Features/TodoLists/GetTodos.cs index 91d7ea8..e80f452 100644 --- a/src/Application/Features/TodoLists/GetTodos.cs +++ b/src/Application/Features/TodoLists/GetTodos.cs @@ -104,4 +104,4 @@ public async Task Handle(GetTodosQuery request, CancellationToken cance .ToListAsync(cancellationToken) }; } -} +} \ No newline at end of file diff --git a/src/Application/Features/TodoLists/UpdateTodoList.cs b/src/Application/Features/TodoLists/UpdateTodoList.cs index cc3ab1e..ba73491 100644 --- a/src/Application/Features/TodoLists/UpdateTodoList.cs +++ b/src/Application/Features/TodoLists/UpdateTodoList.cs @@ -70,12 +70,7 @@ public async Task Handle(UpdateTodoListCommand request, CancellationToken { var entity = await _context.TodoLists .FindAsync(new object[] { request.Id }, cancellationToken) - .ConfigureAwait(false); - - if (entity == null) - { - throw new NotFoundException(nameof(TodoList), request.Id); - } + .ConfigureAwait(false) ?? throw new NotFoundException(nameof(TodoList), request.Id); entity.Title = request.Title; @@ -83,4 +78,4 @@ public async Task Handle(UpdateTodoListCommand request, CancellationToken return Unit.Value; } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Files/CsvFileBuilder.cs b/src/Application/Infrastructure/Files/CsvFileBuilder.cs index 68492a8..5dbcea6 100644 --- a/src/Application/Infrastructure/Files/CsvFileBuilder.cs +++ b/src/Application/Infrastructure/Files/CsvFileBuilder.cs @@ -23,4 +23,4 @@ public byte[] BuildTodoItemsFile(IEnumerable records) return memoryStream.ToArray(); } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Files/Maps/TodoItemRecordMap.cs b/src/Application/Infrastructure/Files/Maps/TodoItemRecordMap.cs index 4f005d7..d098454 100644 --- a/src/Application/Infrastructure/Files/Maps/TodoItemRecordMap.cs +++ b/src/Application/Infrastructure/Files/Maps/TodoItemRecordMap.cs @@ -14,4 +14,4 @@ public TodoItemRecordMap() Map(m => m.Done).ConvertUsing(c => c.Done ? "Yes" : "No"); } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Persistence/ApplicationDbContext.cs b/src/Application/Infrastructure/Persistence/ApplicationDbContext.cs index 8935ce9..65e2da6 100644 --- a/src/Application/Infrastructure/Persistence/ApplicationDbContext.cs +++ b/src/Application/Infrastructure/Persistence/ApplicationDbContext.cs @@ -83,4 +83,4 @@ private async Task DispatchEvents(DomainEvent[] events) await _domainEventService.Publish(@event); } } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Persistence/ApplicationDbContextSeed.cs b/src/Application/Infrastructure/Persistence/ApplicationDbContextSeed.cs index 3c80b50..34bbe56 100644 --- a/src/Application/Infrastructure/Persistence/ApplicationDbContextSeed.cs +++ b/src/Application/Infrastructure/Persistence/ApplicationDbContextSeed.cs @@ -30,4 +30,4 @@ public static async Task SeedSampleDataAsync(ApplicationDbContext context) await context.SaveChangesAsync(); } } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Persistence/Configurations/TodoItemConfiguration.cs b/src/Application/Infrastructure/Persistence/Configurations/TodoItemConfiguration.cs index 7c4d8c6..3d7e3d2 100644 --- a/src/Application/Infrastructure/Persistence/Configurations/TodoItemConfiguration.cs +++ b/src/Application/Infrastructure/Persistence/Configurations/TodoItemConfiguration.cs @@ -15,4 +15,4 @@ public void Configure(EntityTypeBuilder builder) .HasMaxLength(200) .IsRequired(); } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Persistence/Configurations/TodoListConfiguration.cs b/src/Application/Infrastructure/Persistence/Configurations/TodoListConfiguration.cs index f1bde0b..a9efdb6 100644 --- a/src/Application/Infrastructure/Persistence/Configurations/TodoListConfiguration.cs +++ b/src/Application/Infrastructure/Persistence/Configurations/TodoListConfiguration.cs @@ -16,4 +16,4 @@ public void Configure(EntityTypeBuilder builder) builder .OwnsOne(b => b.Colour); } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Persistence/Migrations/20220322201554_InitialMigration.cs b/src/Application/Infrastructure/Persistence/Migrations/20220322201554_InitialMigration.cs index 6a325c0..6adb090 100644 --- a/src/Application/Infrastructure/Persistence/Migrations/20220322201554_InitialMigration.cs +++ b/src/Application/Infrastructure/Persistence/Migrations/20220322201554_InitialMigration.cs @@ -66,4 +66,4 @@ protected override void Down(MigrationBuilder migrationBuilder) name: "TodoLists"); } } -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Services/DateTimeService.cs b/src/Application/Infrastructure/Services/DateTimeService.cs index 957f08c..74e63bb 100644 --- a/src/Application/Infrastructure/Services/DateTimeService.cs +++ b/src/Application/Infrastructure/Services/DateTimeService.cs @@ -5,4 +5,4 @@ namespace VerticalSliceArchitecture.Application.Infrastructure.Services; public class DateTimeService : IDateTime { public DateTime Now => DateTime.Now; -} +} \ No newline at end of file diff --git a/src/Application/Infrastructure/Services/DomainEventService.cs b/src/Application/Infrastructure/Services/DomainEventService.cs index d80d67c..a96535c 100644 --- a/src/Application/Infrastructure/Services/DomainEventService.cs +++ b/src/Application/Infrastructure/Services/DomainEventService.cs @@ -30,4 +30,4 @@ private INotification GetNotificationCorrespondingToDomainEvent(DomainEvent doma return (INotification)Activator.CreateInstance( typeof(DomainEventNotification<>).MakeGenericType(domainEvent.GetType()), domainEvent)!; } -} +} \ No newline at end of file