mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-28 20:23:26 +08:00
21 lines
587 B
C#
21 lines
587 B
C#
|
|
using Volo.Abp.BackgroundWorkers.Hangfire;
|
|||
|
|
using Volo.Abp.DependencyInjection;
|
|||
|
|
|
|||
|
|
namespace Yi.Abp.Web;
|
|||
|
|
|
|||
|
|
public class YiHangfireConventionalRegistrar : DefaultConventionalRegistrar
|
|||
|
|
{
|
|||
|
|
protected override bool IsConventionalRegistrationDisabled(Type type)
|
|||
|
|
{
|
|||
|
|
return !typeof(IHangfireBackgroundWorker).IsAssignableFrom(type) || base.IsConventionalRegistrationDisabled(type);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override List<Type> GetExposedServiceTypes(Type type)
|
|||
|
|
{
|
|||
|
|
return new List<Type>()
|
|||
|
|
{
|
|||
|
|
typeof(IHangfireBackgroundWorker)
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
}
|