From c89aeb635c6ba04cde453f3b6360fd07791fe275 Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Wed, 24 Nov 2010 20:51:35 -0800 Subject: [PATCH] Inverting Lazy and Meta to avoid instantiating controller to get it's type --HG-- branch : perf --- src/Orchard/Mvc/OrchardControllerFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard/Mvc/OrchardControllerFactory.cs b/src/Orchard/Mvc/OrchardControllerFactory.cs index f4596c66b..c66ab2d7e 100644 --- a/src/Orchard/Mvc/OrchardControllerFactory.cs +++ b/src/Orchard/Mvc/OrchardControllerFactory.cs @@ -36,10 +36,10 @@ namespace Orchard.Mvc { var serviceKey = (areaName + "/" + controllerName).ToLowerInvariant(); // Now that the request container is known - try to resolve the controller information - Lazy> info; + Meta> info; var workContext = requestContext.GetWorkContext(); if (TryResolve(workContext, serviceKey, out info)) { - return (Type) info.Value.Metadata["ControllerType"]; + return (Type) info.Metadata["ControllerType"]; } return null;