C# Класс Rebel.Cms.Web.Mvc.ViewEngines.AlternateLocationViewEngine

A ViewEngine that allows a controller's views to be shared with other controllers without having to put these shared views in the 'Shared' folder. This is useful for when you have inherited controllers. This will allow of 'overriding' of views, for example if i have a controller called 'Media' that has an alternate view location of 'Content', the 'Content' folder could contain all of the partial views necessary, but we could have a different main view in the 'Media' folder which would be used and then all of the 'Content' partial views could be used.
Наследование: System.Web.Mvc.RazorViewEngine
Показать файл Открыть проект

Открытые методы

Метод Описание
AlternateLocationViewEngine ( ) : System
FindPartialView ( ControllerContext controllerContext, string partialViewName, bool useCache ) : System.Web.Mvc.ViewEngineResult
FindView ( ControllerContext controllerContext, string viewName, string masterName, bool useCache ) : System.Web.Mvc.ViewEngineResult

Приватные методы

Метод Описание
GetAlternateControllerContext ( ControllerContext currentContext ) : ControllerContext

Returns a new controller context with the alternate controller name in the route values if the current controller is found to contain an AlternateViewEnginePathAttribute.

Описание методов

AlternateLocationViewEngine() публичный Метод

public AlternateLocationViewEngine ( ) : System
Результат System

FindPartialView() публичный Метод

public FindPartialView ( ControllerContext controllerContext, string partialViewName, bool useCache ) : System.Web.Mvc.ViewEngineResult
controllerContext ControllerContext
partialViewName string
useCache bool
Результат System.Web.Mvc.ViewEngineResult

FindView() публичный Метод

public FindView ( ControllerContext controllerContext, string viewName, string masterName, bool useCache ) : System.Web.Mvc.ViewEngineResult
controllerContext ControllerContext
viewName string
masterName string
useCache bool
Результат System.Web.Mvc.ViewEngineResult