#region ========================================================================= USING =====================================================================================
using System.Reflection;
using FluentValidation;
using Microsoft.Extensions.DependencyInjection;
#endregion
namespace Lumina.Infrastructure.Common.DependencyInjection;
///
/// Contains all services of the Infrastructure layer.
///
public static class InfrastructureLayerServices
{
#region ===================================================================== METHODS ===================================================================================
///
/// Extension method for adding the Infrastructure layer services to the DI container.
///
/// The service collection to add the services to.
/// The updated .
public static IServiceCollection AddInfrastructureLayerServices(this IServiceCollection services)
{
// scan the current assembly for validators and add them to the DI container
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly(), ServiceLifetime.Singleton);
return services;
}
#endregion
}