From ed2205972a7b7d6fdd4563c3775a83616920597a Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 19 Jun 2023 02:36:32 +0200 Subject: Working sync --- MatrixRoomUtils.Core/Services/ServiceInstaller.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 MatrixRoomUtils.Core/Services/ServiceInstaller.cs (limited to 'MatrixRoomUtils.Core/Services/ServiceInstaller.cs') 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(); + return services; + } + + +} \ No newline at end of file -- cgit 1.4.1