using System.Reflection; using GB5Shared.DaprCache; using GB5Shared.Hosting; namespace KmsSL; public class KmsModule : IModule { public string DisplayName => "KMS"; public void Register(IServiceCollection services, IConfiguration configuration) { services.AddScoped(); var bll = Assembly.Load("KmsBLL"); var dal = Assembly.Load("KmsDAL"); services.Scan(scan => scan .FromAssemblies(bll, dal) .AddClasses(c => c.Where(t => !t.IsAbstract && !t.IsInterface && (t.Namespace == null || !t.Namespace.Contains(".DTO")))) .AsImplementedInterfaces() .WithScopedLifetime()); } public void MapEndpoints(WebApplication app) { } }