diff options
author | Emma@Rory& <root@rory.gay> | 2023-08-14 05:07:51 +0200 |
---|---|---|
committer | Emma@Rory& <root@rory.gay> | 2023-08-14 05:11:21 +0200 |
commit | aa7026a17ededf7c181ed269c6388491d96e1b1e (patch) | |
tree | 963b45cebbfefb3c5cebaf4ba7134a0e32eb0147 /MatrixRoomUtils.Core/Services/ServiceInstaller.cs | |
parent | Add latest code before splitting projects (diff) | |
download | MatrixUtils-aa7026a17ededf7c181ed269c6388491d96e1b1e.tar.xz |
Split LibMatrix into submodule
Diffstat (limited to 'MatrixRoomUtils.Core/Services/ServiceInstaller.cs')
-rw-r--r-- | MatrixRoomUtils.Core/Services/ServiceInstaller.cs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/MatrixRoomUtils.Core/Services/ServiceInstaller.cs b/MatrixRoomUtils.Core/Services/ServiceInstaller.cs deleted file mode 100644 index bd5b1bd..0000000 --- a/MatrixRoomUtils.Core/Services/ServiceInstaller.cs +++ /dev/null @@ -1,30 +0,0 @@ -using MatrixRoomUtils.Core.Extensions; -using Microsoft.Extensions.DependencyInjection; - -namespace MatrixRoomUtils.Core.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("[MRUCore/DI] No TieredStorageService has been registered!"); - //Add config - if(config is not null) - services.AddSingleton(config); - else { - services.AddSingleton(new RoryLibMatrixConfiguration()); - } - //Add services - services.AddSingleton<HomeserverProviderService>(); - services.AddSingleton<HomeserverResolverService>(); - // services.AddScoped<MatrixHttpClient>(); - return services; - } - - -} - -public class RoryLibMatrixConfiguration { - public string AppName { get; set; } = "Rory&::LibMatrix"; -} |