30 lines
925 B
C#
30 lines
925 B
C#
using LFlow.Base.Interfaces;
|
|
using LFlow.Base.Utils;
|
|
using LFlow.Permission.Model;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Serilog;
|
|
using System.Reflection;
|
|
|
|
namespace LFlow.Permission;
|
|
/// <summary>
|
|
/// 权限模块
|
|
/// </summary>
|
|
public class PermissionModule : IModule
|
|
{
|
|
/// <summary>
|
|
/// 配置模块
|
|
/// </summary>
|
|
/// <param name="services"></param>
|
|
public void ConfigureModule(IServiceCollection services)
|
|
{
|
|
CodeFirst.AddType(typeof(PermissionModel));
|
|
var assembly = Assembly.GetAssembly(typeof(PermissionModule))!;
|
|
var types = assembly.GetTypes().ToList();
|
|
types.RegisterAllService(services);
|
|
types.RegisterAllRepo(services);
|
|
//RegisterModule.RegisterAllModel(types, services);
|
|
services.AddControllers().AddApplicationPart(assembly);
|
|
Log.Logger?.Information("UserManagementModule ConfigureModule done");
|
|
}
|
|
}
|