dengjunjie
2025-02-24 cde56aae50adc11ff8db84e424d873843c566bfd
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/ApplicationSetup.cs
对比新文件
@@ -0,0 +1,28 @@
锘縰sing Microsoft.AspNetCore.Builder;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Core.Extensions
{
    public static class ApplicationSetup
    {
        public static void UseApplicationSetup(this WebApplication app)
        {
            app.Lifetime.ApplicationStarted.Register(() =>
            {
                App.IsRun = true;
            });
            app.Lifetime.ApplicationStopped.Register(() =>
            {
                App.IsRun = false;
                //娓呴櫎鏃ュ織
                //Log.CloseAndFlush();
            });
        }
    }
}