From 1cbcf84174f8fdbd021f8e16466d2784e8fdf38c Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 4 Oct 2024 19:46:45 +0200 Subject: Minor cleanups, support for loading access tokens from disk or appservice --- LibMatrix/Services/ServiceInstaller.cs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'LibMatrix/Services') diff --git a/LibMatrix/Services/ServiceInstaller.cs b/LibMatrix/Services/ServiceInstaller.cs index 06ea9de..8b7e54b 100644 --- a/LibMatrix/Services/ServiceInstaller.cs +++ b/LibMatrix/Services/ServiceInstaller.cs @@ -5,23 +5,13 @@ namespace LibMatrix.Services; 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("[RMUCore/DI] No TieredStorageService has been registered!"); //Add config services.AddSingleton(config ?? new RoryLibMatrixConfiguration()); //Add services services.AddSingleton(sp => new HomeserverResolverService(sp.GetRequiredService>())); - - // if (services.First(x => x.ServiceType == typeof(TieredStorageService)).Lifetime == ServiceLifetime.Singleton) { services.AddSingleton(); - // } - // else { - // services.AddScoped(); - // } - // services.AddScoped(); return services; } } -- cgit 1.4.1