From c75734dfadeeb856d6121de0ad4f8a05ee3f5ed6 Mon Sep 17 00:00:00 2001 From: Steve Bohlen Date: Mon, 2 Feb 2015 20:15:42 -0500 Subject: [PATCH] ensure that refactored DependencyResolver code properly respects named contexts when performing object resolution --- src/Spring/Spring.Web.Mvc3/SpringMvcDependencyResolver.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Spring/Spring.Web.Mvc3/SpringMvcDependencyResolver.cs b/src/Spring/Spring.Web.Mvc3/SpringMvcDependencyResolver.cs index c2609889..65043652 100644 --- a/src/Spring/Spring.Web.Mvc3/SpringMvcDependencyResolver.cs +++ b/src/Spring/Spring.Web.Mvc3/SpringMvcDependencyResolver.cs @@ -97,17 +97,17 @@ namespace Spring.Web.Mvc } // fastest lookup is if we have direct name match - if (_context.ContainsObjectDefinition(serviceType.Name)) + if (ApplicationContext.ContainsObjectDefinition(serviceType.Name)) { - service = _context.GetObject(serviceType.Name); + service = ApplicationContext.GetObject(serviceType.Name); } else { // fall back to more expensive searching with type - var matchingServices = _context.GetObjectNamesForType(serviceType); + var matchingServices = ApplicationContext.GetObjectNamesForType(serviceType); if (matchingServices.Count > 0) { - service = _context.GetObject(matchingServices[0]); + service = ApplicationContext.GetObject(matchingServices[0]); } }