初始提交
This commit is contained in:
27
Services/Hncore.Pass.Sells/Program.cs
Normal file
27
Services/Hncore.Pass.Sells/Program.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user