105040 增加注释
This commit is contained in:
parent
3024bb1d62
commit
f726fa20d8
|
|
@ -253,6 +253,7 @@
|
||||||
<member name="M:LFlow.Base.Program.ConfigDllLoader">
|
<member name="M:LFlow.Base.Program.ConfigDllLoader">
|
||||||
<summary>
|
<summary>
|
||||||
配置DLL加载器
|
配置DLL加载器
|
||||||
|
接管DLL加载过程,处理依赖问题,从当前路径和Service文件夹中加载DLL
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:LFlow.Base.Utils.ApiExplorerGroupPerVersionConvention">
|
<member name="T:LFlow.Base.Utils.ApiExplorerGroupPerVersionConvention">
|
||||||
|
|
|
||||||
|
|
@ -124,15 +124,6 @@ public static class Program
|
||||||
.AllowAnyHeader();
|
.AllowAnyHeader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//// 使用Serilog,此处为了修复 `The logger is already frozen` 的问题,重新配置Serilog
|
|
||||||
//builder.Host.UseSerilog((context, services, config) =>
|
|
||||||
//{
|
|
||||||
// config.ReadFrom.Configuration(context.Configuration)
|
|
||||||
// .ReadFrom.Services(services)
|
|
||||||
// .Enrich.FromLogContext();
|
|
||||||
// // .WriteTo.Console();
|
|
||||||
//}, true);
|
|
||||||
builder.Host.UseSerilog(Log.Logger);
|
builder.Host.UseSerilog(Log.Logger);
|
||||||
// 注册中间件
|
// 注册中间件
|
||||||
builder.Services.RegisterMiddlewares(App.SubServiceAssembly);
|
builder.Services.RegisterMiddlewares(App.SubServiceAssembly);
|
||||||
|
|
@ -236,6 +227,7 @@ public static class Program
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void LoadSubService(this IServiceCollection services)
|
public static void LoadSubService(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
//TODO: 从配置文件中读取加载路径
|
||||||
var path = Path.Combine(AppContext.BaseDirectory, "Services");
|
var path = Path.Combine(AppContext.BaseDirectory, "Services");
|
||||||
// Console.WriteLine(path);
|
// Console.WriteLine(path);
|
||||||
var files = Directory.GetFiles(path, "*.dll");
|
var files = Directory.GetFiles(path, "*.dll");
|
||||||
|
|
@ -294,6 +286,7 @@ public static class Program
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 配置DLL加载器
|
/// 配置DLL加载器
|
||||||
|
/// 接管DLL加载过程,处理依赖问题,从当前路径和Service文件夹中加载DLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void ConfigDllLoader()
|
public static void ConfigDllLoader()
|
||||||
{
|
{
|
||||||
|
|
@ -301,7 +294,7 @@ public static class Program
|
||||||
{
|
{
|
||||||
var assemblyName = new AssemblyName(args.Name);
|
var assemblyName = new AssemblyName(args.Name);
|
||||||
|
|
||||||
// 判断是否已经被加载
|
// 判断是否已经被加载 避免重复加载
|
||||||
var loadedAssembly = AppDomain.CurrentDomain.GetAssemblies()
|
var loadedAssembly = AppDomain.CurrentDomain.GetAssemblies()
|
||||||
.FirstOrDefault(a => a.FullName == assemblyName.FullName);
|
.FirstOrDefault(a => a.FullName == assemblyName.FullName);
|
||||||
if (loadedAssembly != null)
|
if (loadedAssembly != null)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"Urls": "http://*:8088;http://*:3453",
|
"Urls": "http://*:8088;http://*:3453",
|
||||||
"Serilog": {
|
"Serilog": {
|
||||||
"MinimumLevel": {
|
"MinimumLevel": {
|
||||||
"Default": "Debug",
|
"Default": "Information",
|
||||||
"Override": {
|
"Override": {
|
||||||
"Microsoft.AspNetCore.Mvc": "Debug",
|
"Microsoft.AspNetCore.Mvc": "Debug",
|
||||||
"Microsoft.AspNetCore.Routing": "Debug",
|
"Microsoft.AspNetCore.Routing": "Debug",
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace LFlow.UserManagement
|
||||||
// var progController = context.GetRouteData()?.Values["controller"]?.ToString();
|
// var progController = context.GetRouteData()?.Values["controller"]?.ToString();
|
||||||
// var progAction = context.GetRouteData()?.Values["action"]?.ToString();
|
// var progAction = context.GetRouteData()?.Values["action"]?.ToString();
|
||||||
// if (progAction != "ListAll")
|
// if (progAction != "ListAll")
|
||||||
await next();
|
await next();
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// await context.Response.WriteAsync(JsonConvert.SerializeObject(ApiResult<object>.FailResult("无权限!", 100501)));
|
// await context.Response.WriteAsync(JsonConvert.SerializeObject(ApiResult<object>.FailResult("无权限!", 100501)));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue