refactor(architecture): enforce module boundaries
This commit is contained in:
18
Tiku.Infrastructure/Modules/JobsModule.cs
Normal file
18
Tiku.Infrastructure/Modules/JobsModule.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user