Merge remote-tracking branch 'origin/7.0.0' into 7.0.0-pubcontent

This commit is contained in:
Stephan
2013-10-03 18:17:35 +02:00
203 changed files with 2527 additions and 1169 deletions

View File

@@ -29,6 +29,7 @@ using Umbraco.Web.Routing;
using Umbraco.Web.Security;
using Umbraco.Web.WebApi;
using umbraco.BusinessLogic;
using ProfilingViewEngine = Umbraco.Core.Profiling.ProfilingViewEngine;
namespace Umbraco.Web
@@ -74,9 +75,9 @@ namespace Umbraco.Web
new MasterControllerFactory(FilteredControllerFactoriesResolver.Current));
//set the render view engine
ViewEngines.Engines.Add(new ProfilingViewEngine(new RenderViewEngine()));
ViewEngines.Engines.Add(new RenderViewEngine());
//set the plugin view engine
ViewEngines.Engines.Add(new ProfilingViewEngine(new PluginViewEngine()));
ViewEngines.Engines.Add(new PluginViewEngine());
//set model binder
ModelBinders.Binders.Add(new KeyValuePair<Type, IModelBinder>(typeof(RenderModel), new RenderModelBinder()));
@@ -130,7 +131,16 @@ namespace Umbraco.Web
/// <returns></returns>
public override IBootManager Complete(Action<ApplicationContext> afterComplete)
{
//set routes
//Wrap viewengines in the profiling engine
IViewEngine[] engines = ViewEngines.Engines.Select(e => e).ToArray();
ViewEngines.Engines.Clear();
foreach (var engine in engines)
{
var wrappedEngine = engine is ProfilingViewEngine ? engine : new ProfilingViewEngine(engine);
ViewEngines.Engines.Add(wrappedEngine);
}
//set routes
CreateRoutes();
base.Complete(afterComplete);