Files
tiku-backend.net/Tiku.Infrastructure/Modules/JobsModule.cs

19 lines
822 B
C#

using Microsoft.Extensions.DependencyInjection;
using Tiku.Application.Jobs;
using Tiku.Infrastructure.Jobs;
namespace Tiku.Infrastructure;
internal static class JobsModule
{
internal static IServiceCollection AddJobsModule(this IServiceCollection services)
{
services.AddScoped<BackgroundJobService>();
services.AddScoped<IBackgroundJobService>(provider => provider.GetRequiredService<BackgroundJobService>());
services.AddScoped<IBackgroundJobQueue>(provider => provider.GetRequiredService<BackgroundJobService>());
services.AddScoped<IBackgroundJobProcessor>(provider => provider.GetRequiredService<BackgroundJobService>());
services.AddScoped<IBackgroundJobOperations>(provider => provider.GetRequiredService<BackgroundJobService>());
return services;
}
}