Class VirtualPathProviderViewEngine
Represents an abstract base-class implementation of the IViewEngine interface.
public abstract class VirtualPathProviderViewEngine : IViewEngine
- Inheritance
-
VirtualPathProviderViewEngine
- Implements
- Derived
- Inherited Members
Constructors
VirtualPathProviderViewEngine()
Initializes a new instance of the VirtualPathProviderViewEngine class.
protected VirtualPathProviderViewEngine()
Properties
AreaMasterLocationFormats
Gets or sets the area-enabled master location formats.
public string[] AreaMasterLocationFormats { get; set; }
Property Value
- string[]
The area-enabled master location formats.
AreaPartialViewLocationFormats
Gets or sets the area-enabled partial-view location formats.
public string[] AreaPartialViewLocationFormats { get; set; }
Property Value
- string[]
The area-enabled partial-view location formats.
AreaViewLocationFormats
Gets or sets the area-enabled view location formats.
public string[] AreaViewLocationFormats { get; set; }
Property Value
- string[]
The area-enabled view location formats.
DisplayModeProvider
Gets or sets the display mode provider.
protected DisplayModeProvider DisplayModeProvider { get; set; }
Property Value
- DisplayModeProvider
The display mode provider.
FileExtensions
Gets or sets the file-name extensions that are used to locate a view.
public string[] FileExtensions { get; set; }
Property Value
- string[]
The file-name extensions that are used to locate a view.
MasterLocationFormats
Gets or sets the master location formats.
public string[] MasterLocationFormats { get; set; }
Property Value
- string[]
The master location formats.
PartialViewLocationFormats
Gets or sets the partial-view location formats.
public string[] PartialViewLocationFormats { get; set; }
Property Value
- string[]
The partial-view location formats.
ViewLocationCache
Gets or sets the view location cache.
public IViewLocationCache ViewLocationCache { get; set; }
Property Value
- IViewLocationCache
The view location cache.
ViewLocationFormats
Gets or sets the view location formats.
public string[] ViewLocationFormats { get; set; }
Property Value
- string[]
The view location formats.
VirtualPathProvider
Gets or sets the virtual path provider.
protected VirtualPathProvider VirtualPathProvider { get; set; }
Property Value
- VirtualPathProvider
The virtual path provider.
Methods
CreatePartialView(ControllerContext, string)
Creates the specified partial view by using the specified controller context.
protected abstract IView CreatePartialView(ControllerContext controllerContext, string partialPath)
Parameters
controllerContext
ControllerContextThe controller context.
partialPath
stringThe partial path for the new partial view.
Returns
- IView
A reference to the partial view.
CreateView(ControllerContext, string, string)
Creates the specified view by using the controller context, path of the view, and path of the master view.
protected abstract IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath)
Parameters
controllerContext
ControllerContextThe controller context.
viewPath
stringThe path of the view.
masterPath
stringThe path of the master view.
Returns
- IView
A reference to the view.
FileExists(ControllerContext, string)
Returns a value that indicates whether the file is in the specified path by using the specified controller context.
protected virtual bool FileExists(ControllerContext controllerContext, string virtualPath)
Parameters
controllerContext
ControllerContextThe controller context.
virtualPath
stringThe virtual path.
Returns
- bool
true if the file is in the specified path; otherwise, false.
FindPartialView(ControllerContext, string, bool)
Finds the specified partial view by using the specified controller context.
public virtual ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache)
Parameters
controllerContext
ControllerContextThe controller context.
partialViewName
stringThe name of the partial view.
useCache
booltrue to use the cached partial view.
Returns
- ViewEngineResult
The partial view.
Exceptions
- ArgumentNullException
The
controllerContext
parameter is null (Nothing in Visual Basic).- ArgumentException
The
partialViewName
parameter is null or empty.
FindView(ControllerContext, string, string, bool)
Finds the specified view by using the specified controller context and master view name.
public virtual ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
Parameters
controllerContext
ControllerContextThe controller context.
viewName
stringThe name of the view.
masterName
stringThe name of the master view.
useCache
booltrue to use the cached view.
Returns
- ViewEngineResult
The page view.
Exceptions
- ArgumentNullException
The
controllerContext
parameter is null (Nothing in Visual Basic).- ArgumentException
The
viewName
parameter is null or empty.
ReleaseView(ControllerContext, IView)
Releases the specified view by using the specified controller context.
public virtual void ReleaseView(ControllerContext controllerContext, IView view)
Parameters
controllerContext
ControllerContextThe controller context.
view
IViewThe view to release.