hutongqing
2024-11-20 0845150c79d1ebd664753931933e786ed8bd06c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
{
    /// <summary>
    /// MiniProfiler 性能分析
    /// </summary>
    public static class MiniProfilerSetup
    {
        /// <summary>
        /// 性能分析
        /// </summary>
        /// <param name="services"></param>
        /// <exception cref="ArgumentNullException"></exception>
        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";
            });
        }
    }
}