From 82fd53b2b01a71f9d1fa6bca934f5d832b445709 Mon Sep 17 00:00:00 2001 From: Simon G Date: Fri, 3 Dec 2021 17:43:43 +0100 Subject: [PATCH] - only use installers that aren't private --- LightweightIocContainer/Installers/AssemblyInstaller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LightweightIocContainer/Installers/AssemblyInstaller.cs b/LightweightIocContainer/Installers/AssemblyInstaller.cs index 8823855..89a1e6f 100644 --- a/LightweightIocContainer/Installers/AssemblyInstaller.cs +++ b/LightweightIocContainer/Installers/AssemblyInstaller.cs @@ -26,7 +26,7 @@ namespace LightweightIocContainer.Installers Type[] types = assembly.GetTypes(); foreach (Type type in types) { - if (!typeof(IIocInstaller).IsAssignableFrom(type)) + if (!typeof(IIocInstaller).IsAssignableFrom(type) || type.IsNestedPrivate) continue; Installers.Add((IIocInstaller) Activator.CreateInstance(type));