23 lines
850 B
C#
23 lines
850 B
C#
using FluentValidation;
|
|||
|
|
using Helpdesk.Application.Auth;
|
||
|
|
using Helpdesk.Application.Catalogs;
|
||
|
|
using Helpdesk.Application.Users;
|
||
|
|
using Microsoft.Extensions.Configuration;
|
||
|
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
|
|
||
|
|
namespace Helpdesk.Application;
|
||
|
|
|
||
|
|
public static class DependencyInjection
|
||
|
|
{
|
||
|
|
public static IServiceCollection AddApplication(this IServiceCollection services, IConfiguration configuration)
|
||
|
|
{
|
||
|
|
services.Configure<RegistrationOptions>(configuration.GetSection(RegistrationOptions.Section));
|
||
|
|
services.AddValidatorsFromAssembly(typeof(DependencyInjection).Assembly, includeInternalTypes: true);
|
||
|
|
|
||
|
|
services.AddScoped<TokenRevocationService>();
|
||
|
|
services.AddScoped<AuthService>();
|
||
|
|
services.AddScoped<UserService>();
|
||
|
|
services.AddScoped<CatalogService>();
|
||
|
|
return services;
|
||
|
|
}
|
||
|
|
}
|