From 94dc3a3424fb00cfc2f79a0c003c8e77ef3856c0 Mon Sep 17 00:00:00 2001 From: Chomp Date: Sat, 8 Mar 2025 11:07:56 +0000 Subject: [PATCH] Improved `ArgumentOutOfRangeException` handling inside `RegisterComponent` --- .../SPTarkov.DI/DependencyInjectionRegistrator.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Libraries/SPTarkov.DI/DependencyInjectionRegistrator.cs b/Libraries/SPTarkov.DI/DependencyInjectionRegistrator.cs index 8d5c772d..15edf5ea 100644 --- a/Libraries/SPTarkov.DI/DependencyInjectionRegistrator.cs +++ b/Libraries/SPTarkov.DI/DependencyInjectionRegistrator.cs @@ -129,23 +129,23 @@ public static class DependencyInjectionRegistrator private static void RegisterComponent( IServiceCollection builderServices, InjectionType injectionType, - Type registerableInterface, - Type imlementationType + Type registrableInterface, + Type implementationType ) { switch (injectionType) { case InjectionType.Singleton: - builderServices.AddSingleton(registerableInterface, imlementationType); + builderServices.AddSingleton(registrableInterface, implementationType); break; case InjectionType.Transient: - builderServices.AddTransient(registerableInterface, imlementationType); + builderServices.AddTransient(registrableInterface, implementationType); break; case InjectionType.Scoped: - builderServices.AddScoped(registerableInterface, imlementationType); + builderServices.AddScoped(registrableInterface, implementationType); break; default: - throw new ArgumentOutOfRangeException(); + throw new ArgumentOutOfRangeException(nameof(injectionType), "unknown injection type"); } }