C# Class 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
Inheritance: System.Web.Mvc.VirtualPathProviderViewEngine
Afficher le fichier Open project: tqc/RazorEngine Class Usage Examples

Private Properties

Свойство Type Description
CompiledRazorViewEngine System

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
CompiledRazorViewEngine ( ) : System

Method Details

CreatePartialView() protected méthode

protected CreatePartialView ( System.Web.Mvc.ControllerContext controllerContext, string partialPath ) : IView
controllerContext System.Web.Mvc.ControllerContext
partialPath string
Résultat IView

CreateView() protected méthode

protected CreateView ( System.Web.Mvc.ControllerContext controllerContext, string viewPath, string masterPath ) : IView
controllerContext System.Web.Mvc.ControllerContext
viewPath string
masterPath string
Résultat IView

FileExists() protected méthode

protected FileExists ( System.Web.Mvc.ControllerContext controllerContext, string virtualPath ) : bool
controllerContext System.Web.Mvc.ControllerContext
virtualPath string
Résultat bool

GetPageType() public static méthode

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
Résultat System.Type

RegisterViewAssembly() public static méthode

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
Résultat void