FalconSSO/FAuth/Program.cs
2020-04-10 18:19:42 +08:00

39 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using NLog.Web;
using Microsoft.Extensions.Hosting.WindowsServices;
namespace FAuth
{
/// <summary>
/// ½ø³ÌÀà
/// </summary>
public class Program
{
/// <summary>
/// ½ø³ÌÈë¿Ú
/// </summary>
/// <param name="args"></param>
public static void Main(string[] args) {
CreateHostBuilder(args).Build().Run();
}
/// <summary>
/// ´´½¨ÈÝÒ×
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => {
webBuilder.UseStartup<Startup>();
})
.UseWindowsService()
.ConfigureLogging(c => {
c.ClearProviders();
c.SetMinimumLevel(LogLevel.Trace);
})
.UseNLog();
}
}