From 9c6b024205d974f0095bd1dd51fe709284c8faf1 Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Thu, 7 Oct 2010 11:57:00 -0700 Subject: [PATCH] Code review feedback --HG-- branch : dev --- .../Orchard.Setup/Orchard.Setup.csproj | 4 +-- src/Orchard.Web/Orchard.Web.csproj | 2 +- .../Mvc/ViewEngines/Razor/RazorViewEngine.cs | 15 ---------- .../WebForms/WebFormViewEngineForAspNet4.cs | 30 ------------------- .../WebForms/WebFormViewEngineProvider.cs | 6 ++-- src/Orchard/Orchard.Framework.csproj | 2 -- 6 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 src/Orchard/Mvc/ViewEngines/Razor/RazorViewEngine.cs delete mode 100644 src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineForAspNet4.cs diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj index ad162b46a..75c7ea197 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj +++ b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj @@ -83,9 +83,9 @@ - + Designer - + diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index eebce664c..236e79f5a 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -188,7 +188,7 @@ - + diff --git a/src/Orchard/Mvc/ViewEngines/Razor/RazorViewEngine.cs b/src/Orchard/Mvc/ViewEngines/Razor/RazorViewEngine.cs deleted file mode 100644 index 01fe1d20a..000000000 --- a/src/Orchard/Mvc/ViewEngines/Razor/RazorViewEngine.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Diagnostics; -using System.Web.Mvc; - -namespace Orchard.Mvc.ViewEngines.Razor { - public class RazorViewEngine : System.Web.Mvc.RazorViewEngine { - //[DebuggerStepThrough] - //protected override bool FileExists(ControllerContext controllerContext, string virtualPath) { - // if (!virtualPath.EndsWith(".cshtml", StringComparison.InvariantCultureIgnoreCase)) - // return false; - - // return base.FileExists(controllerContext, virtualPath); - //} - } -} diff --git a/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineForAspNet4.cs b/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineForAspNet4.cs deleted file mode 100644 index 19dce318d..000000000 --- a/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineForAspNet4.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Web; -using System.Web.Compilation; -using System.Web.Mvc; - -namespace Orchard.Mvc.ViewEngines.WebForms { - public class WebFormViewEngineForAspNet4 : WebFormViewEngine { - //protected override bool FileExists(ControllerContext controllerContext, string virtualPath) { - // try { - // if (virtualPath.EndsWith(".aspx", StringComparison.InvariantCultureIgnoreCase) || - // virtualPath.EndsWith(".ascx", StringComparison.InvariantCultureIgnoreCase) || - // virtualPath.EndsWith(".master", StringComparison.InvariantCultureIgnoreCase)) { - // return BuildManager.GetObjectFactory(virtualPath, false) != null; - // } - // return false; - // } - // catch (HttpException exception) { - // // Reproducing base class behavior, however these this code path should - // // not be followed for "not found" cases - // if (exception is HttpParseException) { - // throw; - // } - // if ((exception.GetHttpCode() != 0x194) || base.FileExists(controllerContext, virtualPath)) { - // throw; - // } - // return false; - // } - //} - } -} diff --git a/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineProvider.cs b/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineProvider.cs index af223d6cb..dd9eeae73 100644 --- a/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineProvider.cs +++ b/src/Orchard/Mvc/ViewEngines/WebForms/WebFormViewEngineProvider.cs @@ -51,7 +51,7 @@ namespace Orchard.Mvc.ViewEngines.WebForms { //Logger.Debug("AreaPartialViewLocationFormats (theme): \r\n\t-{0}", string.Join("\r\n\t-", areaPartialViewLocationFormats)); - var viewEngine = new WebFormViewEngineForAspNet4 { + var viewEngine = new WebFormViewEngine { MasterLocationFormats = DisabledFormats, ViewLocationFormats = DisabledFormats, PartialViewLocationFormats = partialViewLocationFormats, @@ -85,7 +85,7 @@ namespace Orchard.Mvc.ViewEngines.WebForms { //Logger.Debug("UniversalFormats (module): \r\n\t-{0}", string.Join("\r\n\t-", universalFormats)); - var viewEngine = new WebFormViewEngineForAspNet4 { + var viewEngine = new WebFormViewEngine { MasterLocationFormats = DisabledFormats, ViewLocationFormats = universalFormats, PartialViewLocationFormats = universalFormats, @@ -99,7 +99,7 @@ namespace Orchard.Mvc.ViewEngines.WebForms { public IViewEngine CreateBareViewEngine() { - return new WebFormViewEngineForAspNet4 { + return new WebFormViewEngine { MasterLocationFormats = DisabledFormats, ViewLocationFormats = DisabledFormats, PartialViewLocationFormats = DisabledFormats, diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index e1b34dda8..bf562fca2 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -169,7 +169,6 @@ - @@ -584,7 +583,6 @@ -