mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-18 04:33:16 +08:00
34 lines
935 B
C#
34 lines
935 B
C#
![]() |
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Sample
|
|||
|
{
|
|||
|
public class WebApiApplication : HttpApplication
|
|||
|
{
|
|||
|
private Hangfire.BackgroundJobServer _backgroundJobServer;
|
|||
|
|
|||
|
protected void Application_Start()
|
|||
|
{
|
|||
|
// ע<><D7A2> WebAPI <20><><EFBFBD><EFBFBD>
|
|||
|
AreaRegistration.RegisterAllAreas();
|
|||
|
|
|||
|
// ע<><D7A2> WebAPI <20><><EFBFBD><EFBFBD>
|
|||
|
GlobalConfiguration.Configure(WebApiConfiguration.Register);
|
|||
|
|
|||
|
// ע<><D7A2>ȫ<EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
FilterRegistration.RegisterGlobalFilters(GlobalFilters.Filters);
|
|||
|
|
|||
|
// ע<><D7A2>·<EFBFBD>ɱ<EFBFBD>
|
|||
|
RouteRegistration.RegisterRoutes(RouteTable.Routes);
|
|||
|
|
|||
|
// <20><>ʼ<EFBFBD><CABC> Autofac <20><><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
AutofacInitializer.Init();
|
|||
|
|
|||
|
// <20><>ʼ<EFBFBD><CABC> Hangfire <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|||
|
_backgroundJobServer = HangfireInitializer.Init();
|
|||
|
}
|
|||
|
|
|||
|
protected void Application_End()
|
|||
|
{
|
|||
|
_backgroundJobServer?.Dispose();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|