using AutoMapper;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using xAiApi.AI.Interfaces;
using xAiApi.AI.Mppings;
using xAiApi.AI.Services;
namespace xAiApi.AI.DI
{
public static class AIExtensions
{
///
/// Register AI Services ...
///
///
public static void AddXAIServices(
this IServiceCollection services
)
{
//
// Register AutoMapper Using Mapping Profiles ...
services.AddAutoMapper(typeof(MappingProfiles).Assembly);
//
// TODO: Remove this ...
services.AddSingleton();
//
// Since we Used Repositories in this Service,
// we have to Register it Scoped Lifetime ...
services.AddScoped();
}
///
/// Use AI Service Middlewares ...
///
///
public static void UseXAIServices(this IApplicationBuilder builder)
{ }
//
#region Private ...
#endregion
}
}