diff --git a/Composite/Core/IO/SpecialModesFileResolver.cs b/Composite/AspNet/DisplayModesFileResolver.cs
similarity index 80%
rename from Composite/Core/IO/SpecialModesFileResolver.cs
rename to Composite/AspNet/DisplayModesFileResolver.cs
index d92e858c3c..a550477360 100644
--- a/Composite/Core/IO/SpecialModesFileResolver.cs
+++ b/Composite/AspNet/DisplayModesFileResolver.cs
@@ -1,13 +1,12 @@
-using System;
-using System.IO;
+using System.IO;
using System.Web;
using System.Web.Hosting;
using System.Web.WebPages;
-namespace Composite.Core.IO
+namespace Composite.AspNet
{
///
- public static class SpecialModesFileResolver
+ public static class DisplayModesFileResolver
{
///
public static string ResolveFileInInDirectory(string directory, string file, string extension, HttpContextBase context)
@@ -17,7 +16,7 @@ public static string ResolveFileInInDirectory(string directory, string file, str
foreach (var mode in modes)
{
- var specialFile = Path.Combine(directory, String.Format("{0}{1}", file, extension));
+ var specialFile = Path.Combine(directory, $"{file}{extension}");
var displayInfo = mode.GetDisplayInfo(context, specialFile, pathProvider.FileExists);
if (displayInfo != null)
diff --git a/Composite/AspNet/Razor/RazorHelper.cs b/Composite/AspNet/Razor/RazorHelper.cs
index 3c7e6d57de..272b580f9c 100644
--- a/Composite/AspNet/Razor/RazorHelper.cs
+++ b/Composite/AspNet/Razor/RazorHelper.cs
@@ -5,8 +5,6 @@
//using System.Web.Instrumentation;
using System.Web.WebPages;
using System.Xml;
-using System.Xml.Linq;
-using Composite.Core.IO;
//using Composite.Core.Extensions;
//using Composite.Core.IO;
using Composite.Core.Types;
@@ -45,7 +43,7 @@ public static object ExecuteRazorPage(
var directory = Path.GetDirectoryName(virtualPath);
var function = Path.GetFileNameWithoutExtension(virtualPath);
- virtualPath = SpecialModesFileResolver.ResolveFileInInDirectory(directory, function, ".cshtml", new HttpContextWrapper(currentContext));
+ virtualPath = DisplayModesFileResolver.ResolveFileInInDirectory(directory, function, ".cshtml", new HttpContextWrapper(currentContext));
}
webPage = WebPageBase.CreateInstanceFromVirtualPath(virtualPath);
diff --git a/Composite/Composite.csproj b/Composite/Composite.csproj
index 88aff155d0..bb1a647937 100644
--- a/Composite/Composite.csproj
+++ b/Composite/Composite.csproj
@@ -189,7 +189,7 @@
-
+
diff --git a/Composite/Plugins/Functions/FunctionProviders/UserControlFunctionProvider/UserControlBasedFunction.cs b/Composite/Plugins/Functions/FunctionProviders/UserControlFunctionProvider/UserControlBasedFunction.cs
index 3c4392c753..0132d797c0 100644
--- a/Composite/Plugins/Functions/FunctionProviders/UserControlFunctionProvider/UserControlBasedFunction.cs
+++ b/Composite/Plugins/Functions/FunctionProviders/UserControlFunctionProvider/UserControlBasedFunction.cs
@@ -4,7 +4,6 @@
using System.Web;
using System.Web.UI;
using Composite.AspNet;
-using Composite.Core.Application;
using Composite.Core.IO;
using Composite.Plugins.Functions.FunctionProviders.FileBasedFunctionProvider;
@@ -56,9 +55,9 @@ public override object Execute(Composite.Functions.ParameterList parameters,
var directory = Path.GetDirectoryName(VirtualPath);
var function = Path.GetFileNameWithoutExtension(VirtualPath);
- var virtualPath = SpecialModesFileResolver.ResolveFileInInDirectory(directory, function, ".ascx", new HttpContextWrapper(httpContext));
+ var virtualPath = DisplayModesFileResolver.ResolveFileInInDirectory(directory, function, ".ascx", new HttpContextWrapper(httpContext));
- var userControl = currentPage.LoadControl(VirtualPath);
+ var userControl = currentPage.LoadControl(virtualPath);
foreach (var param in parameters.AllParameterNames)
diff --git a/Composite/Plugins/PageTemplates/MasterPages/MasterPagePageRenderer.cs b/Composite/Plugins/PageTemplates/MasterPages/MasterPagePageRenderer.cs
index 25e9875af9..b0b3a6185d 100644
--- a/Composite/Plugins/PageTemplates/MasterPages/MasterPagePageRenderer.cs
+++ b/Composite/Plugins/PageTemplates/MasterPages/MasterPagePageRenderer.cs
@@ -2,19 +2,17 @@
using System.IO;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Xml.Linq;
using System.Linq;
using System.Web;
+using Composite.AspNet;
using Composite.C1Console.Security;
using Composite.Core.Collections.Generic;
using Composite.Core.Extensions;
-using Composite.Core.IO;
using Composite.Core.PageTemplates;
using Composite.Core.WebClient.Renderings.Page;
using Composite.Core.Xml;
using Composite.Data.Types;
-
namespace Composite.Plugins.PageTemplates.MasterPages
{
internal class MasterPagePageRenderer : IPageRenderer
@@ -57,7 +55,7 @@ public void AttachToPage(Page aspnetPage, PageContentToRender contentToRender)
var dir = Path.GetDirectoryName(rendering.VirtualPath);
var template = Path.GetFileNameWithoutExtension(rendering.VirtualPath);
- var file = SpecialModesFileResolver.ResolveFileInInDirectory(dir, template, ".master", new HttpContextWrapper(HttpContext.Current));
+ var file = DisplayModesFileResolver.ResolveFileInInDirectory(dir, template, ".master", new HttpContextWrapper(HttpContext.Current));
aspnetPage.MasterPageFile = file;
aspnetPage.PreRender += (e, args) => PageOnPreRender(aspnetPage, contentToRender.Page);
diff --git a/Composite/Plugins/PageTemplates/Razor/RazorPageRenderer.cs b/Composite/Plugins/PageTemplates/Razor/RazorPageRenderer.cs
index e6581f47cc..d9f0596fda 100644
--- a/Composite/Plugins/PageTemplates/Razor/RazorPageRenderer.cs
+++ b/Composite/Plugins/PageTemplates/Razor/RazorPageRenderer.cs
@@ -5,11 +5,11 @@
using System.Web.UI;
using System.Web.WebPages;
using System.Xml.Linq;
+using Composite.AspNet;
using Composite.AspNet.Razor;
using Composite.Core.Collections.Generic;
using Composite.Core.Extensions;
using Composite.Core.Instrumentation;
-using Composite.Core.IO;
using Composite.Core.PageTemplates;
using Composite.Core.WebClient.Renderings.Page;
using Composite.Functions;
@@ -64,7 +64,7 @@ private void RendererPage(object sender, EventArgs e)
{
var directory = Path.GetDirectoryName(renderingInfo.ControlVirtualPath);
var template = Path.GetFileNameWithoutExtension(renderingInfo.ControlVirtualPath);
- var file = SpecialModesFileResolver.ResolveFileInInDirectory(directory, template, ".cshtml", new HttpContextWrapper(HttpContext.Current));
+ var file = DisplayModesFileResolver.ResolveFileInInDirectory(directory, template, ".cshtml", new HttpContextWrapper(HttpContext.Current));
webPage = WebPageBase.CreateInstanceFromVirtualPath(file);