mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 10:08:20 +08:00
chore(tenpayv3): 新增基于 .NET Framework 4.7 的示例项目
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user