C# 클래스 CompiledViews.Mvc.CompiledRazorViewEngine

Allow to embed precompiled razorviews (or any other webviewpage) Things that would be nice to have in Microsoft's code: - public access to VirtualPathFactoryManager.Instance - public access to VirtualPathFactoryManager.PageExists - let either store IVirtualPathFactory just the Type to construct instead of a constructor, or: let DictionaryBasedVirtualPathFactory use IoC if it's registered - allow to override BuildManager implementations, that way we could hook into the framework on that level, instead of creating an extra viewengine
상속: System.Web.Mvc.VirtualPathProviderViewEngine
파일 보기 프로젝트 열기: tqc/RazorEngine 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CompiledRazorViewEngine System

공개 메소드들

메소드 설명
GetPageType ( string virtualPath ) : Type

Get the type of the viewpage class for a virtual path. Returns null if the view page does not exist

RegisterViewAssembly ( Assembly a ) : void

Find all views in the assembly and map them to virtual paths. Views with the same virtual path will overwrite existing views to allow an individual project to override views from a common library.

보호된 메소드들

메소드 설명
CreatePartialView ( System.Web.Mvc.ControllerContext controllerContext, string partialPath ) : IView
CreateView ( System.Web.Mvc.ControllerContext controllerContext, string viewPath, string masterPath ) : IView
FileExists ( System.Web.Mvc.ControllerContext controllerContext, string virtualPath ) : bool

비공개 메소드들

메소드 설명
CompiledRazorViewEngine ( ) : System

메소드 상세

CreatePartialView() 보호된 메소드

protected CreatePartialView ( System.Web.Mvc.ControllerContext controllerContext, string partialPath ) : IView
controllerContext System.Web.Mvc.ControllerContext
partialPath string
리턴 IView

CreateView() 보호된 메소드

protected CreateView ( System.Web.Mvc.ControllerContext controllerContext, string viewPath, string masterPath ) : IView
controllerContext System.Web.Mvc.ControllerContext
viewPath string
masterPath string
리턴 IView

FileExists() 보호된 메소드

protected FileExists ( System.Web.Mvc.ControllerContext controllerContext, string virtualPath ) : bool
controllerContext System.Web.Mvc.ControllerContext
virtualPath string
리턴 bool

GetPageType() 공개 정적인 메소드

Get the type of the viewpage class for a virtual path. Returns null if the view page does not exist
public static GetPageType ( string virtualPath ) : Type
virtualPath string
리턴 System.Type

RegisterViewAssembly() 공개 정적인 메소드

Find all views in the assembly and map them to virtual paths. Views with the same virtual path will overwrite existing views to allow an individual project to override views from a common library.
public static RegisterViewAssembly ( Assembly a ) : void
a System.Reflection.Assembly
리턴 void