|
|
|
@ -1,22 +1,22 @@ |
|
|
|
|
using Tiobon.Core.Common; |
|
|
|
|
using System.Text; |
|
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
|
using System.Text; |
|
|
|
|
using Tiobon.Core.Common; |
|
|
|
|
using Tiobon.Core.Common.DB; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Extensions |
|
|
|
|
namespace Tiobon.Core.Extensions; |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 项目 启动服务 |
|
|
|
|
/// </summary> |
|
|
|
|
public static class AppConfigSetup |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 项目 启动服务 |
|
|
|
|
/// </summary> |
|
|
|
|
public static class AppConfigSetup |
|
|
|
|
{ |
|
|
|
|
public static void AddAppTableConfigSetup(this IServiceCollection services, IHostEnvironment env) |
|
|
|
|
{ |
|
|
|
|
if (services == null) throw new ArgumentNullException(nameof(services)); |
|
|
|
|
|
|
|
|
|
if (AppSettings.app(new string[] { "Startup", "AppConfigAlert", "Enabled" }).ObjToBool()) |
|
|
|
|
if (AppSettings.app(["Startup", "AppConfigAlert", "Enabled"]).ObjToBool()) |
|
|
|
|
{ |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
{ |
|
|
|
@ -105,5 +105,4 @@ namespace Tiobon.Core.Extensions |
|
|
|
|
#endregion 中间件 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |