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
controllerContextControllerContextThe controller context.
partialPathstringThe 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
controllerContextControllerContextThe controller context.
viewPathstringThe path of the view.
masterPathstringThe 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
controllerContextControllerContextThe controller context.
virtualPathstringThe 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
controllerContextControllerContextThe controller context.
partialViewNamestringThe name of the partial view.
useCachebooltrue to use the cached partial view.
Returns
- ViewEngineResult
The partial view.
Exceptions
- ArgumentNullException
The
controllerContextparameter is null (Nothing in Visual Basic).- ArgumentException
The
partialViewNameparameter 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
controllerContextControllerContextThe controller context.
viewNamestringThe name of the view.
masterNamestringThe name of the master view.
useCachebooltrue to use the cached view.
Returns
- ViewEngineResult
The page view.
Exceptions
- ArgumentNullException
The
controllerContextparameter is null (Nothing in Visual Basic).- ArgumentException
The
viewNameparameter 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
controllerContextControllerContextThe controller context.
viewIViewThe view to release.