using System.Reflection; using GB5Shared.GOP.Qualifier; using GB5Shared.DaprCache; using GB5Shared.EntityHandler; using GB5Shared.Export; using GB5Shared.Export.CSVExport; using GB5Shared.Export.HybridReport; using GB5Shared.Export.Pivot; using GB5Shared.ExcelExport; using GB5Shared.GenerateAutoNumber; using GB5Shared.GB5Library.Qualifier; using GB5Shared.Hosting; using GB5Shared.PubSub.OutBox; using GB5Shared.WorkFlow.WorkFlowEngine; using GB5Shared.WorkFlow.WorkFlowRunTime; using Microsoft.AspNetCore.ResponseCompression; namespace AccountsSL; public class AccountsModule : IModule { public void Register(IServiceCollection services, IConfiguration configuration) { services.AddHttpContextAccessor(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddGB5QualifierEngine(); services.AddScoped(typeof(BaseEntityAppService<>), typeof(BaseEntityAppService<>)); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // PartyBLL's IAddressDAL now lives in AccountsDAL (AccountsDAL.CustomCode.Address) and is // picked up by the Scrutor scan below — no explicit registration needed. services.AddResponseCompression(o => { o.EnableForHttps = true; o.Providers.Add(); }); var accountsBLLAssembly = Assembly.Load("AccountsBLL"); var accountsDALAssembly = Assembly.Load("AccountsDAL"); services.Scan(scan => scan .FromAssemblies(accountsBLLAssembly, accountsDALAssembly) .AddClasses(c => c.Where(t => !t.IsAbstract && !t.IsInterface && (t.Namespace == null || !t.Namespace.Contains(".DTO")) && !typeof(Exception).IsAssignableFrom(t))) .AsImplementedInterfaces() .WithScopedLifetime()); } public void MapEndpoints(WebApplication app) { } }