diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2024-01-05 12:22:42 +0100 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2024-01-05 12:22:42 +0100 |
commit | f215dca816745ef54f5436d6cea9350d6dcd3982 (patch) | |
tree | 2749bcd4d1297943478b6080d5688ef642ca1d40 /LibMatrix/Services/ServiceInstaller.cs | |
parent | ToObject and ToJson for MatrixException (diff) | |
download | LibMatrix-f215dca816745ef54f5436d6cea9350d6dcd3982.tar.xz |
Cleanup
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; |