Table of Contents

Class BuildManagerCompiledView

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

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 ControllerContext

The controller context.

viewPath string

The 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 ControllerContext

Context information for the current controller. This information includes the HTTP context, request context, route data, parent action view context, and more.

viewPath string

The path to the view that will be rendered.

viewPageActivator IViewPageActivator

The 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 ViewContext

Information related to rendering a view, such as view data, temporary data, and form context.

writer TextWriter

The 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 ViewContext

Information related to rendering a view, such as view data, temporary data, and form context.

writer TextWriter

The writer object.

instance object

An object that contains additional information that can be used in the view.