using System.IO.Compression; using GB5Shared.GOP.Qualifier; using System.Reflection; using GB5Shared.GenerateAutoNumber; using GB5Shared.DaprCache; using GB5Shared.EntityHandler; using GB5Shared.GB5Library.Qualifier; using GB5Shared.Hosting; using GB5Shared.ListQuery; using GB5Shared.PubSub.OutBox; using GB5Shared.WorkFlow.WorkFlowEngine; using GB5Shared.WorkFlow.WorkFlowRunTime; using Microsoft.AspNetCore.ResponseCompression; using QMSDAL.Query.Matrix; namespace QMSSL; public class QMSModule : IModule { public void Register(IServiceCollection services, IConfiguration configuration) { services.AddScoped(); services.AddScoped(typeof(BaseEntityAppService<>)); services.AddScoped(); services.AddGB5QualifierEngine(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddResponseCompression(o => { o.EnableForHttps = true; o.Providers.Add(); }); services.Configure(o => { o.Level = CompressionLevel.Fastest; }); services.AddScoped(); var qmsBLLAssembly = Assembly.Load("QMSBLL"); var qmsDALAssembly = Assembly.Load("QMSDAL"); services.Scan(scan => scan .FromAssemblies(qmsBLLAssembly, qmsDALAssembly) .AddClasses(c => c.Where(t => !t.IsAbstract && !t.IsInterface && (t.Namespace == null || !t.Namespace.Contains(".DTO")))) .AsImplementedInterfaces() .WithScopedLifetime()); services.AddListInfrastructure(qmsDALAssembly); } public void MapEndpoints(WebApplication app) { } }