C# 클래스 Rebel.Cms.Web.Mvc.ViewEngines.PluginViewEngine

A ViewEngine to support non-embedded views for packaged plugins for both editors, property editors and dashboards
Views will be found in the folders: ~/App_Plugins/Packages/[PackageName]/Editors/Views/{0} ~/App_Plugins/Packages/Core/Editors/Views/{0} ~/App_Plugins/Packages/[PackageName]/PropertyEditors/Views/{0} ~/App_Plugins/Packages/Core/PropertyEditors/Views/{0} ~/App_Plugins/Packages/[PackageName]/Dashboards/{0} ~/App_Plugins/Packages/Core/Dashboards/{0} Front-end partial views & child action views can be found in these folders: ~/App_Plugins/Packages/[PackageName]/Views/Partial/{0}
상속: System.Web.Mvc.RazorViewEngine
파일 보기 프로젝트 열기: RebelCMS/rebelcmsxu5

공개 메소드들

메소드 설명
FindPartialView ( ControllerContext controllerContext, string partialViewName, bool useCache ) : System.Web.Mvc.ViewEngineResult

If we're not rendering in an rebel context this will exit

NOTE: If someone has a lot of packages installed, the number of folders being searched will be fairly insane it would be good if VirtualPathProviderViewEngine exposed its members for path finding but they are all marked as private, so we could either copy all of its code in here or find another nice way to avoid having to lookup so many folders. We could aid in this performance by injecting different data tokens for different types of views (i.e. Dashboards, etc...) then we can actually have a differerent ViewEngines for those specific ones by checking for the correct token.

FindView ( ControllerContext controllerContext, string viewName, string masterName, bool useCache ) : System.Web.Mvc.ViewEngineResult

If we're not rendering in an rebel context, this will exit, otherwise will find the view based on the base class implementation.

PluginViewEngine ( RebelSettings settings, IPackageContext packageContext ) : System

Constructor

비공개 메소드들

메소드 설명
SetViewLocations ( ) : void
ShouldFindView ( ControllerContext controllerContext, bool isPartial ) : bool

Determines if a view should be found, this is to improve performance of view lookups but also to decrease the amount of overlap with other view engines.

메소드 상세

FindPartialView() 공개 메소드

If we're not rendering in an rebel context this will exit
NOTE: If someone has a lot of packages installed, the number of folders being searched will be fairly insane it would be good if VirtualPathProviderViewEngine exposed its members for path finding but they are all marked as private, so we could either copy all of its code in here or find another nice way to avoid having to lookup so many folders. We could aid in this performance by injecting different data tokens for different types of views (i.e. Dashboards, etc...) then we can actually have a differerent ViewEngines for those specific ones by checking for the correct token.
public FindPartialView ( ControllerContext controllerContext, string partialViewName, bool useCache ) : System.Web.Mvc.ViewEngineResult
controllerContext ControllerContext
partialViewName string
useCache bool
리턴 System.Web.Mvc.ViewEngineResult

FindView() 공개 메소드

If we're not rendering in an rebel context, this will exit, otherwise will find the view based on the base class implementation.
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

PluginViewEngine() 공개 메소드

Constructor
public PluginViewEngine ( RebelSettings settings, IPackageContext packageContext ) : System
settings RebelSettings
packageContext IPackageContext
리턴 System