Hangfire and VB.NET - Gettings things configured in the Application Startup class

后端 未结 2 1670
情歌与酒
情歌与酒 2021-01-22 09:57

Earlier this week I ran across Scott Hanselman\'s post about background processing in ASP.NET (http://www.hanselman.com/blog/HowToRunBackgroundTasksInASPNET.aspx). I\'ve written

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-22 10:34

    You should be able to write that as:

    Public Sub Configure(app As IAppBuilder)
        Dim act = Sub(config As IBootstrapperConfiguration)
                    config.UseSqlServerStorage("<...>")
                    config.UseServer()
                  End Sub
    
        app.UseHangfire(act)
    End Sub
    

    For more on creating multi line lambdas in VB.Net, refer to the MSDN.

提交回复
热议问题