这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.4 KiB

using JetBrains.Annotations;
using Microsoft.AspNetCore.Builder;
using System;
using Volo.Abp;
namespace Hangfire
{
public static class HangfireApplicationBuilderExtensions
{
public static IApplicationBuilder UseHangfireDashboard(
[NotNull] this IApplicationBuilder app,
[CanBeNull] Action<DashboardOptions> setup = null)
{
Check.NotNull(app, nameof(app));
return app.UseHangfireDashboard("/hangfire", setup, null);
}
public static IApplicationBuilder UseHangfireDashboard(
[NotNull] this IApplicationBuilder app,
[CanBeNull] string pathMatch = "/hangfire",
[CanBeNull] Action<DashboardOptions> setup = null)
{
Check.NotNull(app, nameof(app));
return app.UseHangfireDashboard(pathMatch, setup, null);
}
public static IApplicationBuilder UseHangfireDashboard(
[NotNull] this IApplicationBuilder app,
[CanBeNull] string pathMatch = "/hangfire",
[CanBeNull] Action<DashboardOptions> setup = null,
[CanBeNull] JobStorage storage = null)
{
Check.NotNull(app, nameof(app));
var options = new DashboardOptions();
setup?.Invoke(options);
return app.UseHangfireDashboard(pathMatch: pathMatch, options: options, storage: storage);
}
}
}