diff --git a/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs b/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs index ec060e21..905573aa 100644 --- a/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs +++ b/src/Lumina.Application/Common/DependencyInjection/ApplicationLayerServices.cs @@ -1,7 +1,6 @@ #region ========================================================================= USING ===================================================================================== using FluentValidation; using Lumina.Application.Common.Behaviors; -using Lumina.Application.Common.DomainEvents; using Mediator; using Microsoft.Extensions.DependencyInjection; using System.Diagnostics.CodeAnalysis; @@ -34,8 +33,6 @@ public static class ApplicationLayerServices // register fluent validators services.AddValidatorsFromAssembly(typeof(ApplicationLayerServices).Assembly); - services.AddScoped(); - return services; } } diff --git a/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs b/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs index f5be1e57..54c63f4d 100644 --- a/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs +++ b/src/Lumina.Infrastructure/Common/DependencyInjection/InfrastructureLayerServices.cs @@ -1,5 +1,6 @@ #region ========================================================================= USING ===================================================================================== using FluentValidation; +using Lumina.Application.Common.DomainEvents; using Lumina.Application.Common.Infrastructure.Authentication; using Lumina.Application.Common.Infrastructure.Authorization; using Lumina.Application.Common.Infrastructure.Authorization.Policies.Over18; @@ -10,6 +11,7 @@ using Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.Library using Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.LibraryScanAggregate.Services.Jobs; using Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.LibraryScanAggregate.Services.Queue; using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.BookLibraryAggregate.Services.Jobs; +using Lumina.Infrastructure.Common.DomainEvents; using Lumina.Infrastructure.Core.Authentication; using Lumina.Infrastructure.Core.Authorization; using Lumina.Infrastructure.Core.Authorization.Policies.Common.Factory; @@ -52,6 +54,8 @@ public static class InfrastructureLayerServices services.AddSingleton(); services.AddSingleton(); + services.AddScoped(); + // authorization services.AddScoped(); services.AddScoped(); diff --git a/src/Lumina.Application/Common/DomainEvents/DomainEventsQueue.cs b/src/Lumina.Infrastructure/Common/DomainEvents/DomainEventsQueue.cs similarity index 92% rename from src/Lumina.Application/Common/DomainEvents/DomainEventsQueue.cs rename to src/Lumina.Infrastructure/Common/DomainEvents/DomainEventsQueue.cs index 41c7fa6a..041a3ddc 100644 --- a/src/Lumina.Application/Common/DomainEvents/DomainEventsQueue.cs +++ b/src/Lumina.Infrastructure/Common/DomainEvents/DomainEventsQueue.cs @@ -1,9 +1,10 @@ #region ========================================================================= USING ===================================================================================== +using Lumina.Application.Common.DomainEvents; using Lumina.Domain.Common.Events; using System.Collections.Concurrent; #endregion -namespace Lumina.Application.Common.DomainEvents; +namespace Lumina.Infrastructure.Common.DomainEvents; /// /// Represents a thread-safe queue for managing domain events.