diff options
Diffstat (limited to '')
-rw-r--r-- | LibMatrix/Services/ServiceInstaller.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LibMatrix/Services/ServiceInstaller.cs b/LibMatrix/Services/ServiceInstaller.cs index b1c98e1..ad5bedc 100644 --- a/LibMatrix/Services/ServiceInstaller.cs +++ b/LibMatrix/Services/ServiceInstaller.cs @@ -6,20 +6,20 @@ public static class ServiceInstaller { public static IServiceCollection AddRoryLibMatrixServices(this IServiceCollection services, RoryLibMatrixConfiguration? config = null) { //Check required services - if (!services.Any(x => x.ServiceType == typeof(TieredStorageService))) - throw new Exception("[MRUCore/DI] No TieredStorageService has been registered!"); + // if (!services.Any(x => x.ServiceType == typeof(TieredStorageService))) + // throw new Exception("[MRUCore/DI] No TieredStorageService has been registered!"); //Add config services.AddSingleton(config ?? new RoryLibMatrixConfiguration()); //Add services services.AddSingleton<HomeserverResolverService>(); - if (services.First(x => x.ServiceType == typeof(TieredStorageService)).Lifetime == ServiceLifetime.Singleton) { + // if (services.First(x => x.ServiceType == typeof(TieredStorageService)).Lifetime == ServiceLifetime.Singleton) { services.AddSingleton<HomeserverProviderService>(); - } - else { - services.AddScoped<HomeserverProviderService>(); - } + // } + // else { + // services.AddScoped<HomeserverProviderService>(); + // } // services.AddScoped<MatrixHttpClient>(); return services; |