about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Services/ServiceInstaller.cs
blob: 43255d83495c573c2a4254ce61ba6a8c679ee68f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using MatrixRoomUtils.Core.Interfaces.Services;
using Microsoft.Extensions.DependencyInjection;

namespace MatrixRoomUtils.Core.Services; 

public static class ServiceInstaller {
    
    public static IServiceCollection AddRoryLibMatrixServices(this IServiceCollection services) {
        if (!services.Any(x => x.ServiceType == typeof(TieredStorageService)))
            throw new Exception("[MRUCore/DI] No TieredStorageService has been registered!");
        services.AddScoped<HomeserverProviderService>();
        return services;
    }
    
    
}