27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using FileService.Application.Ports;
|
|
using FileService.Domain.IReposities;
|
|
using FileService.Infrastructure.Reposites;
|
|
using FileService.Infrastructure.Storage;
|
|
using IM.Application.Abstractions;
|
|
using IM.Commons;
|
|
using IM.Infrastructure.Efcore;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace FileService.Infrastructure
|
|
{
|
|
public class ModuleInit : IModuleInitializer
|
|
{
|
|
public void Initialize(IServiceCollection services)
|
|
{
|
|
services.AddScoped<IUploadFileReposity, UploadFileReposity>();
|
|
services.AddScoped<IUploadTaskReposity, UploadTaskReposity>();
|
|
services.AddScoped<IObjectStoragePort, LocalStorageAdapter>();
|
|
services.AddScoped<IRedisService, RedisCacheService>();
|
|
services.AddScoped<IObjectStorageRouter, ObjectStorageRouter>();
|
|
services.AddScoped<IStorageRedisCache,StorageCacheService>();
|
|
services.AddScoped<ILocalChunkStorage, LocalStorageAdapter>();
|
|
services.AddScoped<IUnitOfWork, EfUnitOfWork<FileDbContext>>();
|
|
}
|
|
}
|
|
}
|