You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
715 B
C#

using System;
using EntrustSettle.Extensions.HostedService;
using Microsoft.Extensions.DependencyInjection;
namespace EntrustSettle.Extensions;
public static class InitializationHostServiceSetup
{
/// <summary>
/// 应用初始化服务注入
/// </summary>
/// <param name="services"></param>
public static void AddInitializationHostServiceSetup(this IServiceCollection services)
{
if (services is null)
{
ArgumentNullException.ThrowIfNull(nameof(services));
}
services.AddHostedService<SeedDataHostedService>();
services.AddHostedService<QuartzJobHostedService>();
services.AddHostedService<EventBusHostedService>();
}
}