From 4ef9ae4b396b0eb37036d4008e8cb40e468dbe73 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Fri, 9 Feb 2024 16:32:46 +0100 Subject: Apply syntax style to LibMatrix --- LibMatrix/Services/ServiceInstaller.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'LibMatrix/Services/ServiceInstaller.cs') diff --git a/LibMatrix/Services/ServiceInstaller.cs b/LibMatrix/Services/ServiceInstaller.cs index 358dc2a..0f07b61 100644 --- a/LibMatrix/Services/ServiceInstaller.cs +++ b/LibMatrix/Services/ServiceInstaller.cs @@ -3,11 +3,10 @@ using Microsoft.Extensions.DependencyInjection; 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!"); + // throw new Exception("[RMUCore/DI] No TieredStorageService has been registered!"); //Add config services.AddSingleton(config ?? new RoryLibMatrixConfiguration()); @@ -15,19 +14,17 @@ public static class ServiceInstaller { services.AddSingleton(); // if (services.First(x => x.ServiceType == typeof(TieredStorageService)).Lifetime == ServiceLifetime.Singleton) { - services.AddSingleton(); + services.AddSingleton(); // } // else { - // services.AddScoped(); + // services.AddScoped(); // } // services.AddScoped(); return services; } - - } public class RoryLibMatrixConfiguration { public string AppName { get; set; } = "Rory&::LibMatrix"; -} +} \ No newline at end of file -- cgit 1.4.1