diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-19 02:36:32 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-19 02:36:32 +0200 |
commit | ed2205972a7b7d6fdd4563c3775a83616920597a (patch) | |
tree | 54aec1cfdf861fd8a7739be131fbe79ae24d91e4 /MatrixRoomUtils.Core/Services/ServiceInstaller.cs | |
parent | Partial refactor (diff) | |
download | MatrixUtils-ed2205972a7b7d6fdd4563c3775a83616920597a.tar.xz |
Working sync
Diffstat (limited to 'MatrixRoomUtils.Core/Services/ServiceInstaller.cs')
-rw-r--r-- | MatrixRoomUtils.Core/Services/ServiceInstaller.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Core/Services/ServiceInstaller.cs b/MatrixRoomUtils.Core/Services/ServiceInstaller.cs new file mode 100644 index 0000000..43255d8 --- /dev/null +++ b/MatrixRoomUtils.Core/Services/ServiceInstaller.cs @@ -0,0 +1,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; + } + + +} \ No newline at end of file |