using System.Reflection; using GB5Shared.GOP.Qualifier; using GB5Shared.EntityHandler; using GB5Shared.GB5Library.Qualifier; using GB5Shared.GenerateAutoNumber; using GB5Shared.GOP.ExecuteAsync; using GB5Shared.Hosting; using GB5Shared.PubSub.OutBox; using GB5Shared.WorkFlow.WorkFlowEngine; using GB5Shared.WorkFlow.WorkFlowRunTime; namespace CRMSL; public class CRMModule : IModule { public void Register(IServiceCollection services, IConfiguration configuration) { services.AddHttpClient(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(typeof(BaseEntityAppService<>), typeof(BaseEntityAppService<>)); services.AddScoped(); services.AddGB5QualifierEngine(); services.AddScoped(); services.AddScoped(); var crmBLLAssembly = Assembly.Load("CRMBLL"); var crmDALAssembly = Assembly.Load("CRMDAL"); services.Scan(scan => scan .FromAssemblies(crmBLLAssembly, crmDALAssembly) .AddClasses(classes => classes.Where(t => !t.IsAbstract && !t.IsInterface)) .AsImplementedInterfaces() .WithScopedLifetime()); } public void MapEndpoints(WebApplication app) { } }