using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Core.Helper; namespace WIDESEA_Core.Extensions { /// /// MiniProfiler 性能分析 /// public static class MiniProfilerSetup { /// /// 添加 MiniProfiler 配置到服务集合 /// /// 服务集合 /// 当 services 为 null 时抛出 /// 配置 MiniProfiler 的基础路由路径为 "/profiler" public static void AddMiniProfilerSetup(this IServiceCollection services) { if (services == null) throw new ArgumentNullException(nameof(services)); //if (AppSettings.app(new string[] { "Startup", "MiniProfiler", "Enabled" }).ObjToBool()) //{ services.AddMiniProfiler(options => { options.RouteBasePath = "/profiler"; }); } } }