using Core.Thalos.Application.UseCases.Modules; using Core.Thalos.Application.UseCases.Modules.Adapter; using Core.Thalos.Application.UseCases.Modules.Input; using Core.Thalos.Application.UseCases.Modules.Ports; using Core.Thalos.Application.UseCases.Modules.Validator; using Core.Thalos.Application.UseCases.Permissions; using Core.Thalos.Application.UseCases.Permissions.Adapter; using Core.Thalos.Application.UseCases.Permissions.Input; using Core.Thalos.Application.UseCases.Permissions.Ports; using Core.Thalos.Application.UseCases.Permissions.Validator; using Core.Thalos.Application.UseCases.Role; using Core.Thalos.Application.UseCases.Roles.Adapter; using Core.Thalos.Application.UseCases.Roles.Input; using Core.Thalos.Application.UseCases.Roles.Ports; using Core.Thalos.Application.UseCases.Roles.Validator; using Core.Thalos.Application.UseCases.Users; using Core.Thalos.Application.UseCases.Users.Adapter; using Core.Thalos.Application.UseCases.Users.Input; using Core.Thalos.Application.UseCases.Users.Ports; using Core.Thalos.Application.UseCases.Users.Validator; using FluentValidation; using Lib.Architecture.BuildingBlocks; namespace Core.Thalos.Service.API.Extensions { public static class ServiceCollectionExtension { public static IServiceCollection AddServiceConfigurationLayer(this IServiceCollection services) { #region User Services services.AddScoped(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddScoped, UserHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateUserValidator>(); services.AddScoped, UserHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateUserValidator>(); services.AddScoped, UserHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangeUserStatusValidator>(); services.AddScoped, UserHandler>(); #endregion #region Role Services services.AddScoped(); services.AddScoped, RoleHandler>(); services.AddScoped, RoleHandler>(); services.AddScoped, RoleHandler>(); services.AddScoped, RoleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateRoleValidator>(); services.AddScoped, RoleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateRoleValidator>(); services.AddScoped, RoleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangeRoleStatusValidator>(); services.AddScoped, RoleHandler>(); #endregion #region Permission Services services.AddScoped(); services.AddScoped, PermissionHandler>(); services.AddScoped, PermissionHandler>(); services.AddScoped, PermissionHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreatePermissionValidator>(); services.AddScoped, PermissionHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdatePermissionValidator>(); services.AddScoped, PermissionHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangePermissionStatusValidator>(); services.AddScoped, PermissionHandler>(); #endregion #region Module Services services.AddScoped(); services.AddScoped, ModuleHandler>(); services.AddScoped, ModuleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, GetAllModulesByListValidator>(); services.AddScoped, ModuleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, CreateModuleValidator>(); services.AddScoped, ModuleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, UpdateModuleValidator>(); services.AddScoped, ModuleHandler>(); services.AddValidatorsFromAssemblyContaining(); services.AddScoped, ChangeModuleStatusValidator>(); services.AddScoped, ModuleHandler>(); #endregion return services; } } }