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
Показать файл Открыть проект Примеры использования класса

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