using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using NLog.Web;
using Microsoft.Extensions.Hosting.WindowsServices;
namespace FAuth
{
///
/// 进程类
///
public class Program
{
///
/// 进程入口
///
///
public static void Main(string[] args) {
CreateHostBuilder(args).Build().Run();
}
///
/// 创建容易
///
///
///
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => {
webBuilder.UseStartup();
})
.UseWindowsService()
.ConfigureLogging(c => {
c.ClearProviders();
c.SetMinimumLevel(LogLevel.Trace);
})
.UseNLog();
}
}