Class BuildManagerCompiledView
Represents the base class for views that are compiled by the BuildManager class before being rendered by a view engine.
public abstract class BuildManagerCompiledView : IView
- Inheritance
-
BuildManagerCompiledView
- Implements
- Derived
- Inherited Members
Constructors
BuildManagerCompiledView(ControllerContext, string)
Initializes a new instance of the BuildManagerCompiledView class using the specified controller context and view path.
protected BuildManagerCompiledView(ControllerContext controllerContext, string viewPath)
Parameters
controllerContext
ControllerContextThe controller context.
viewPath
stringThe view path.
BuildManagerCompiledView(ControllerContext, string, IViewPageActivator)
Initializes a new instance of the BuildManagerCompiledView class using the specified controller context, view path, and view page activator.
protected BuildManagerCompiledView(ControllerContext controllerContext, string viewPath, IViewPageActivator viewPageActivator)
Parameters
controllerContext
ControllerContextContext information for the current controller. This information includes the HTTP context, request context, route data, parent action view context, and more.
viewPath
stringThe path to the view that will be rendered.
viewPageActivator
IViewPageActivatorThe object responsible for dynamically constructing the view page at run time.
Exceptions
- ArgumentNullException
The
controllerContext
parameter is null.- ArgumentException
The
viewPath
parameter is null or empty.
Properties
ViewPath
Gets or sets the view path.
public string ViewPath { get; protected set; }
Property Value
- string
The view path.
Methods
Render(ViewContext, TextWriter)
Renders the specified view context by using the specified the writer object.
public virtual void Render(ViewContext viewContext, TextWriter writer)
Parameters
viewContext
ViewContextInformation related to rendering a view, such as view data, temporary data, and form context.
writer
TextWriterThe writer object.
Exceptions
- ArgumentNullException
The
viewContext
parameter is null.- SInvalidOperationException
An instance of the view type could not be created.
RenderView(ViewContext, TextWriter, object)
When overridden in a derived class, renders the specified view context by using the specified writer object and object instance.
protected abstract void RenderView(ViewContext viewContext, TextWriter writer, object instance)
Parameters
viewContext
ViewContextInformation related to rendering a view, such as view data, temporary data, and form context.
writer
TextWriterThe writer object.
instance
objectAn object that contains additional information that can be used in the view.