From 2319617fed4c066c142b505249a7da491f608ae3 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 27 Aug 2018 18:09:10 +0200 Subject: [PATCH] Cleanup LightInjectContainer --- .../Composing/LightInject/LightInjectContainer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs b/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs index 502dc91ff8..b8ba597578 100644 --- a/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs +++ b/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs @@ -35,9 +35,11 @@ namespace Umbraco.Core.Composing.LightInject { var container = new ServiceContainer(new ContainerOptions { EnablePropertyInjection = false }); - // supports annotated constructor injections + // note: the block below is disabled, as it is too LightInject-specific + // + // supports annotated constructor injections // eg to specify the service name on some services - container.EnableAnnotatedConstructorInjection(); + //container.EnableAnnotatedConstructorInjection(); // note: the block below is disabled, we do not allow property injection at all anymore // (see options in CreateServiceContainer) @@ -56,7 +58,7 @@ namespace Umbraco.Core.Composing.LightInject //Container.EnableAnnotatedPropertyInjection(); // ensure that we do *not* scan assemblies - // we explicitely RegisterFrom our own composition roots and don't want them scanned + // we explicitly RegisterFrom our own composition roots and don't want them scanned container.AssemblyScanner = new AssemblyScanner(/*container.AssemblyScanner*/); // see notes in MixedLightInjectScopeManagerProvider