From 4eb9c777ffc999c29cca7f68cd4501c4a807798b Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 9 Feb 2015 02:07:42 -0800 Subject: [PATCH] React to removal of AddScopedInstance --- src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs | 2 -- src/Microsoft.AspNet.Mvc/MvcServices.cs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs index f77364fa6f..3f50f69fe0 100644 --- a/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc/MvcServiceCollectionExtensions.cs @@ -41,13 +41,11 @@ namespace Microsoft.Framework.DependencyInjection services.AddOptions(configuration); services.AddDataProtection(configuration); services.AddRouting(configuration); - services.AddScopedInstance(configuration); services.AddAuthorization(configuration); services.Configure(routeOptions => routeOptions.ConstraintMap .Add("exists", typeof(KnownRouteValueConstraint))); - } } } diff --git a/src/Microsoft.AspNet.Mvc/MvcServices.cs b/src/Microsoft.AspNet.Mvc/MvcServices.cs index 49a247c7ec..425d946b86 100644 --- a/src/Microsoft.AspNet.Mvc/MvcServices.cs +++ b/src/Microsoft.AspNet.Mvc/MvcServices.cs @@ -37,6 +37,7 @@ namespace Microsoft.AspNet.Mvc typeof(INestedProviderManagerAsync<>), typeof(NestedProviderManagerAsync<>)); yield return describe.Transient(); + yield return describe.Scoped(typeof(IScopedInstance<>), typeof(ScopedInstance<>)); // Core action discovery, filters and action execution.