From da102032b5dd3e4f8acaee1412a1ff38a87ad871 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 8 Oct 2014 19:28:37 -0700 Subject: [PATCH] Reacting to Dependency Injection changes --- src/Microsoft.AspNet.Hosting/HostingServices.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Microsoft.AspNet.Hosting/HostingServices.cs b/src/Microsoft.AspNet.Hosting/HostingServices.cs index a90b3232bc..ed8ac10442 100644 --- a/src/Microsoft.AspNet.Hosting/HostingServices.cs +++ b/src/Microsoft.AspNet.Hosting/HostingServices.cs @@ -54,12 +54,7 @@ namespace Microsoft.AspNet.Hosting // TODO: Do we expect this to be provide by the runtime eventually? yield return describer.Singleton(); - yield return new ServiceDescriptor - { - ServiceType = typeof(IContextAccessor<>), - ImplementationType = typeof(ContextAccessor<>), - Lifecycle = LifecycleKind.Scoped - }; + yield return describer.Scoped(typeof(IContextAccessor<>), typeof(ContextAccessor<>)); if (PlatformHelper.IsMono) {