using System.Reflection; using GB5Shared.DaprCache; using GB5Shared.EventLogPublish; using GB5Shared.Hosting; namespace AMPSL; public class AMPModule : IModule { public void Register(IServiceCollection services, IConfiguration configuration) { services.AddScoped(); services.AddScoped(); var ampBLLAssembly = Assembly.Load("AmpBLL"); var ampDALAssembly = Assembly.Load("AmpDAL"); services.Scan(scan => scan .FromAssemblies(ampBLLAssembly, ampDALAssembly) .AddClasses(c => c.Where(t => !t.IsAbstract && !t.IsInterface && (t.Namespace == null || !t.Namespace.Contains(".DTO")))) .AsImplementedInterfaces() .WithScopedLifetime()); } public void MapEndpoints(WebApplication app) { } }