Files
juipnet/Services/Hncore.Pass.Sells/Program.cs

27 lines
839 B
C#
Raw Normal View History

2020-10-07 20:25:03 +08:00
using Hncore.Infrastructure.Common;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using System;
using System.Threading.Tasks;
namespace Hncore.Pass.Sells
{
public class Program
{
public static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
LogHelper.Fatal("未捕获的异常", e.ExceptionObject.ToString());
};
TaskScheduler.UnobservedTaskException += (_, ev) => { LogHelper.Fatal("未捕获的异常", ev.Exception); };
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}